Reflection for RapidJSON
0.0.6
Reflection for serializing/deserializing with RapidJSON
|
The JsonSerializable class provides the CRTP-base for (de)serializable objects. More...
#include <reflector.h>
Public Member Functions | |
void | push (RAPIDJSON_NAMESPACE::Value &container) |
Pushes the object to the specified RapidJSON array. More... | |
void | push (RAPIDJSON_NAMESPACE::Value &container, const char *name) |
Pushes the object to the specified RapidJSON object as a member with the specified name. More... | |
RAPIDJSON_NAMESPACE::StringBuffer | toJson () const |
Converts the object to its JSON representation. More... | |
Static Public Member Functions | |
static Type | fromJson (const char *json, std::size_t jsonSize, JsonDeserializationErrors *errors=nullptr) |
Constructs a new object from the specified JSON. More... | |
static Type | fromJson (const char *json, JsonDeserializationErrors *errors=nullptr) |
Constructs a new object from the specified JSON. More... | |
static Type | fromJson (const std::string &json, JsonDeserializationErrors *errors=nullptr) |
Constructs a new object from the specified JSON. More... | |
Static Public Attributes | |
static constexpr const char * | qualifiedName = "ReflectiveRapidJSON::JsonSerializable" |
The JsonSerializable class provides the CRTP-base for (de)serializable objects.
Definition at line 28 of file reflector.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 63 of file serializable.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 71 of file serializable.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 79 of file serializable.h.
void ReflectiveRapidJSON::JsonSerializable< Type >::push | ( | RAPIDJSON_NAMESPACE::Value & | container | ) |
Pushes the object to the specified RapidJSON array.
Definition at line 38 of file serializable.h.
void ReflectiveRapidJSON::JsonSerializable< Type >::push | ( | RAPIDJSON_NAMESPACE::Value & | container, |
const char * | name | ||
) |
Pushes the object to the specified RapidJSON object as a member with the specified name.
Definition at line 46 of file serializable.h.
RAPIDJSON_NAMESPACE::StringBuffer ReflectiveRapidJSON::JsonSerializable< Type >::toJson | ( | ) | const |
Converts the object to its JSON representation.
Definition at line 55 of file serializable.h.
|
static |
Definition at line 32 of file serializable.h.