|
virtual void | AddMember (const std::string &key, bool member)=0 |
| Add a boolean member to an Object with the specified key and value.
|
|
virtual void | AddMember (const std::string &key, const std::shared_ptr< JsonValue > &jsonValue)=0 |
| Add a value member to an Object.
|
|
virtual void | AddMember (const std::string &key, const std::string &member)=0 |
|
virtual void | AddMember (const std::string &key, int member)=0 |
| Add a signed integer member to an Object with the specified key and value.
|
|
virtual void | AddMember (const std::string &key, unsigned int member)=0 |
| Add an unsigned integer member to an Object with the specified key and value.
|
|
virtual bool | GetBool () const =0 |
| If the current value is a bool, return it.
|
|
virtual double | GetDouble () const =0 |
| If the current value is a double, return it.
|
|
virtual int | GetInt () const =0 |
| If the current value is an int, return it.
|
|
virtual std::shared_ptr< JsonValue > | GetMember (const std::string &key) const =0 |
| return child value with the specified key if this is an Object.
|
|
virtual std::shared_ptr< JsonValue > | GetMember (unsigned int index) const =0 |
| return child value at specified index if this is an Array.
|
|
virtual std::string | GetString () const =0 |
| If the current value is a string, return it.
|
|
virtual std::vector< std::string > | GetStringArray () const =0 |
| return value array as strings, skip non string elements.
|
|
virtual std::vector< std::pair< std::string, std::string > > | GetStringObjectMembers () const =0 |
| Return all string members of this object and their keys, skip non string elements.
|
|
virtual unsigned int | GetUint () const =0 |
| If the current value is a uint, return it.
|
|
virtual bool | HasMember (const std::string &key) const =0 |
| return true if object has a child with the specified key.
|
|
virtual bool | IsArray () const =0 |
| check if value is a json array.
|
|
virtual bool | IsBool () const =0 |
| Return true if the current value is a bool.
|
|
virtual bool | IsInt () const =0 |
| Returns true if the current value is an int.
|
|
virtual bool | IsNumber () const =0 |
| Return true if the current value is a number of any type.
|
|
virtual bool | IsObject () const =0 |
| check if value is a json object.
|
|
virtual bool | IsString () const =0 |
| check if value is a string.
|
|
virtual bool | IsUint () const =0 |
| Return true if the current value is an unsigned int.
|
|
virtual void | PushBack (const std::shared_ptr< JsonValue > &jsonValue)=0 |
| Add a value member to an Array.
|
|
virtual void | PushBack (const std::string &member)=0 |
| Add a string member to an Array with the specified value.
|
|
virtual std::string | SerializeToString () const =0 |
| Serialize the value and all children as a string.
|
|
virtual size_t | Size () const =0 |
| return number of child elements.
|
|
Definition at line 42 of file json_value.h.
virtual std::vector< std::pair< std::string, std::string > > JsonValue::GetStringObjectMembers |
( |
| ) |
const |
|
pure virtual |
Return all string members of this object and their keys, skip non string elements.
Example: for the json object {"a": "b", "c": "d", "e": 1, "f": {"g": "h"}} this method would return a vector of two pairs: ("a", "b") and ("c", "d").
- Returns
- all string members of this object and their keys as a vector of pairs.