Reflection for RapidJSON
0.0.15
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 (rapidjson::StringBuffer). More... | |
RAPIDJSON_NAMESPACE::Document | toJsonDocument () const |
Converts the object to its JSON representation (rapidjson::Document). 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 33 of file reflector.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 81 of file serializable.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 73 of file serializable.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 89 of file serializable.h.
void ReflectiveRapidJSON::JsonSerializable< Type >::push | ( | RAPIDJSON_NAMESPACE::Value & | container | ) |
Pushes the object to the specified RapidJSON array.
Definition at line 39 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 47 of file serializable.h.
RAPIDJSON_NAMESPACE::StringBuffer ReflectiveRapidJSON::JsonSerializable< Type >::toJson |
Converts the object to its JSON representation (rapidjson::StringBuffer).
Definition at line 56 of file serializable.h.
RAPIDJSON_NAMESPACE::Document ReflectiveRapidJSON::JsonSerializable< Type >::toJsonDocument |
Converts the object to its JSON representation (rapidjson::Document).
Definition at line 65 of file serializable.h.
|
staticconstexpr |
Definition at line 33 of file serializable.h.