#include <Json.h>
Classes | |
class | Array |
class | ArrayType |
Interface implemented by JSON array type containers. More... | |
class | Map |
class | MapType |
Interface implemented by JSON map type containers. More... | |
class | Serializable |
Interface implemented by (de)serializable classes. Preferrably use the type alias JXXON::Serializable for implementations. More... | |
Public Member Functions | |
Json () | |
Default constructor. Creates a Json object representing the null value. | |
Json (const Json &other)=delete | |
Json & | operator= (const Json &other)=delete |
Json (Json &&other) | |
Move constructor. | |
Json (const std::string &document) | |
Constructor parsing Json value from string document. | |
Json & | operator= (Json &&other) |
Move assignment operator. | |
bool | isNull () const |
Return true if object is representing a null value. | |
std::string | toString () const |
Return Json value as string. | |
template<typename T > | |
T | get (const std::string &name) const |
Return property of type T with name from Json object. | |
template<typename T > | |
void | set (const std::string &name, const T &value) |
Set property of type T with name in Json object. | |
Friends | |
template<typename T , typename Enable > | |
class | Accessor::GetArrayElements |
template<typename T , typename Enable > | |
class | Accessor::SetArrayElements |
template<typename T , typename Enable > | |
class | Accessor::GetMapElements |
template<typename T , typename Enable > | |
class | Accessor::SetMapElements |
std::istream & | operator>> (std::istream &in, Json &json) |
Stream operator overload reading Json objects. | |
std::ostream & | operator<< (std::ostream &out, const Json &json) |
Stream operator overload writing Json objects. | |
Main object mapper class.
Produced as output of toJson() on serialization. Consumed as constructor parameter for serializable classes on deserilization.
Example: