Google APIs Client Library for C++
|
Denotes a JsonCppData instance that is a dictionary. More...
#include "client/data/jsoncpp_data.h"
Public Member Functions | |
JsonCppDictionary (const Json::Value &value) | |
JsonCppDictionary (Json::Value *value) | |
int | size () const |
bool | has (const char *key) const |
void | remove (const char *key) |
void | put_value (const char *key, const Json::Value &data) |
NOTE(ewiseblatt): 20120827 The data value here is mutable. | |
void | put_object (const char *key, const JsonCppData &value) |
const Json::Value & | as_value (const char *key) const |
const JsonCppData | as_object (const char *key) const |
JsonCppData | mutable_object (const char *key) |
Denotes a JsonCppData instance that is a dictionary.
The JsonCppData wraps a shared reference to jsoncpp values. Multiple objects may reference the same values. A dictionary does not have homogenous value types. Usually you want to use an associative array instead.
This class is not thread-safe.
JsonCppDictionary | ( | const Json::Value & | value | ) | [explicit] |
JsonCppDictionary | ( | Json::Value * | value | ) | [explicit] |
const JsonCppData as_object | ( | const char * | key | ) | const [inline] |
const Json::Value& as_value | ( | const char * | key | ) | const [inline] |
bool has | ( | const char * | key | ) | const [inline] |
JsonCppData mutable_object | ( | const char * | key | ) | [inline] |
void put_object | ( | const char * | key, |
const JsonCppData & | value | ||
) | [inline] |
void put_value | ( | const char * | key, |
const Json::Value & | data | ||
) | [inline] |
NOTE(ewiseblatt): 20120827 The data value here is mutable.
Currently there isnt a way to have just const values in a dictionary.
void remove | ( | const char * | key | ) | [inline] |
int size | ( | ) | const [inline] |