Json class reference

Public member functions

~Json ()
Destructor.
Json ()
Constructs a default Json object. Equivalent to Json("null").
Json (const Json &in)
Constructs a new Json object from an existing Json object (deep copy).
Json (const char *jsonString)
Constructs a new Json object from a JSON string.
Json (const char *jsonString, int len)
Constructs a new Json object from a JSON string with length.
Json (const Jsonb &in)
Constructs a new Json object from a Jsonb object.
int arrayLength () const
Number of elements in a JSON array.
Json & stripNulls ()
Recursively removes all key - value pairs whose value is null from a JSON object.
const char * typeName () const
Type name of this JSON document.
char * toString () const
Converts to string.
Json get (int index) const
Gets JSON element by index.
Json get (const char *key) const
Gets JSON value by key.
Json get (const Jsonb &path) const
Gets JSON element by path.
Json clone () const
Makes a (deep) copy of this object.
int fill (char *ptr) const
Fills ptr with the data of this object.
Json operator[] (int index) const
Gets JSON element by index.
Json operator[] (const char *key) const
Gets JSON value by key.
Json & operator= (const Json &rhs)
Re-initializes the left operand with data from the right operand.