diff options
author | Mike Buland <mbuland@penny-arcade.com> | 2017-08-23 09:06:35 -0700 |
---|---|---|
committer | Mike Buland <mbuland@penny-arcade.com> | 2017-08-23 09:06:35 -0700 |
commit | f7d8270ec0f3aa7b6a82a88520912ac0c37ed74f (patch) | |
tree | ca5e928a63d16fad6065d3cda87a3e1f68260ed2 /src/unstable | |
parent | b82c6e251b995353ce205bbd53f3db2b985c5345 (diff) | |
download | libbu++-f7d8270ec0f3aa7b6a82a88520912ac0c37ed74f.tar.gz libbu++-f7d8270ec0f3aa7b6a82a88520912ac0c37ed74f.tar.bz2 libbu++-f7d8270ec0f3aa7b6a82a88520912ac0c37ed74f.tar.xz libbu++-f7d8270ec0f3aa7b6a82a88520912ac0c37ed74f.zip |
Added append to the json interface.
It needs a lot more help.
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 b22ca0d..7e19e85 100644 --- a/src/unstable/json.cpp +++ b/src/unstable/json.cpp | |||
@@ -170,6 +170,11 @@ void Bu::Json::insert( const Bu::String &sKey, Bu::Json *pObj ) | |||
170 | uDat.pObject->insert( sKey, pObj ); | 170 | uDat.pObject->insert( sKey, pObj ); |
171 | } | 171 | } |
172 | 172 | ||
173 | void Bu::Json::append( Bu::Json *pObj ) | ||
174 | { | ||
175 | uDat.pArray->append( pObj ); | ||
176 | } | ||
177 | |||
173 | void Bu::Json::parse( Bu::Stream &sInput ) | 178 | void Bu::Json::parse( Bu::Stream &sInput ) |
174 | { | 179 | { |
175 | reset(); | 180 | reset(); |
diff --git a/src/unstable/json.h b/src/unstable/json.h index 6042f7d..1dad055 100644 --- a/src/unstable/json.h +++ b/src/unstable/json.h | |||
@@ -53,6 +53,7 @@ namespace Bu | |||
53 | const_iterator end() const; | 53 | const_iterator end() const; |
54 | 54 | ||
55 | void insert( const Bu::String &sKey, Bu::Json *pObj ); | 55 | void insert( const Bu::String &sKey, Bu::Json *pObj ); |
56 | void append( Bu::Json *pObj ); | ||
56 | 57 | ||
57 | void parse( Bu::Stream &sInput ); | 58 | void parse( Bu::Stream &sInput ); |
58 | void parse( const Bu::String &sInput ); | 59 | void parse( const Bu::String &sInput ); |