From d5ff686220bde38bf7d1da55779a1bda9b771d53 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 23 Aug 2017 14:41:17 -0700 Subject: Json has a "has" function now. --- src/unstable/json.cpp | 5 +++++ src/unstable/json.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src') 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 return uDat.pArray->end(); } +bool Bu::Json::has( const Bu::String &sKey ) const +{ + return uDat.pObject->has( sKey ); +} + void Bu::Json::insert( const Bu::String &sKey, Bu::Json *pObj ) { 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 iterator end(); const_iterator end() const; + bool has( const Bu::String &sKey ) const; void insert( const Bu::String &sKey, Bu::Json *pObj ); void append( Bu::Json *pObj ); -- cgit v1.2.3