From f7d8270ec0f3aa7b6a82a88520912ac0c37ed74f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 23 Aug 2017 09:06:35 -0700 Subject: Added append to the json interface. It needs a lot more help. --- src/unstable/json.cpp | 5 +++++ src/unstable/json.h | 1 + 2 files changed, 6 insertions(+) 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 ) uDat.pObject->insert( sKey, pObj ); } +void Bu::Json::append( Bu::Json *pObj ) +{ + uDat.pArray->append( pObj ); +} + void Bu::Json::parse( Bu::Stream &sInput ) { 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 const_iterator end() const; void insert( const Bu::String &sKey, Bu::Json *pObj ); + void append( Bu::Json *pObj ); void parse( Bu::Stream &sInput ); void parse( const Bu::String &sInput ); -- cgit v1.2.3