diff options
Diffstat (limited to 'src/unstable/json.cpp')
-rw-r--r-- | src/unstable/json.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/unstable/json.cpp b/src/unstable/json.cpp index f5a1696..d13f6e2 100644 --- a/src/unstable/json.cpp +++ b/src/unstable/json.cpp | |||
@@ -116,7 +116,7 @@ bool Bu::Json::isNull() const | |||
116 | 116 | ||
117 | Bu::Json *Bu::Json::operator[]( const Bu::String &sKey ) const | 117 | Bu::Json *Bu::Json::operator[]( const Bu::String &sKey ) const |
118 | { | 118 | { |
119 | if( eType != Boolean ) | 119 | if( eType != Object ) |
120 | throw Bu::ExceptionBase( | 120 | throw Bu::ExceptionBase( |
121 | "Object entry requested from non-object json object." | 121 | "Object entry requested from non-object json object." |
122 | ); | 122 | ); |
@@ -159,6 +159,11 @@ Bu::Json::const_iterator Bu::Json::end() const | |||
159 | return uDat.pArray->end(); | 159 | return uDat.pArray->end(); |
160 | } | 160 | } |
161 | 161 | ||
162 | void Bu::Json::insert( const Bu::String &sKey, Bu::Json *pObj ) | ||
163 | { | ||
164 | uDat.pObject->insert( sKey, pObj ); | ||
165 | } | ||
166 | |||
162 | void Bu::Json::parse( Bu::Stream &sInput ) | 167 | void Bu::Json::parse( Bu::Stream &sInput ) |
163 | { | 168 | { |
164 | reset(); | 169 | reset(); |