diff options
author | Mike Buland <mbuland@penny-arcade.com> | 2017-08-23 14:41:17 -0700 |
---|---|---|
committer | Mike Buland <mbuland@penny-arcade.com> | 2017-08-23 14:41:17 -0700 |
commit | d5ff686220bde38bf7d1da55779a1bda9b771d53 (patch) | |
tree | 6cd45e09489ee3d1337e1a40f2882b7477109e2f | |
parent | f7d8270ec0f3aa7b6a82a88520912ac0c37ed74f (diff) | |
download | libbu++-d5ff686220bde38bf7d1da55779a1bda9b771d53.tar.gz libbu++-d5ff686220bde38bf7d1da55779a1bda9b771d53.tar.bz2 libbu++-d5ff686220bde38bf7d1da55779a1bda9b771d53.tar.xz libbu++-d5ff686220bde38bf7d1da55779a1bda9b771d53.zip |
Json has a "has" function now.
Diffstat (limited to '')
-rw-r--r-- | src/unstable/json.cpp | 5 | ||||
-rw-r--r-- | src/unstable/json.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/unstable/json.cpp b/src/unstable/json.cpp index 7e19e85..5f6165c 100644 --- a/src/unstable/json.cpp +++ b/src/unstable/json.cpp | |||
@@ -165,6 +165,11 @@ Bu::Json::const_iterator Bu::Json::end() const | |||
165 | return uDat.pArray->end(); | 165 | return uDat.pArray->end(); |
166 | } | 166 | } |
167 | 167 | ||
168 | bool Bu::Json::has( const Bu::String &sKey ) const | ||
169 | { | ||
170 | return uDat.pObject->has( sKey ); | ||
171 | } | ||
172 | |||
168 | void Bu::Json::insert( const Bu::String &sKey, Bu::Json *pObj ) | 173 | void Bu::Json::insert( const Bu::String &sKey, Bu::Json *pObj ) |
169 | { | 174 | { |
170 | uDat.pObject->insert( sKey, pObj ); | 175 | uDat.pObject->insert( sKey, pObj ); |
diff --git a/src/unstable/json.h b/src/unstable/json.h index 1dad055..7ac6f51 100644 --- a/src/unstable/json.h +++ b/src/unstable/json.h | |||
@@ -52,6 +52,7 @@ namespace Bu | |||
52 | iterator end(); | 52 | iterator end(); |
53 | const_iterator end() const; | 53 | const_iterator end() const; |
54 | 54 | ||
55 | bool has( const Bu::String &sKey ) const; | ||
55 | void insert( const Bu::String &sKey, Bu::Json *pObj ); | 56 | void insert( const Bu::String &sKey, Bu::Json *pObj ); |
56 | void append( Bu::Json *pObj ); | 57 | void append( Bu::Json *pObj ); |
57 | 58 | ||