Reflection for RapidJSON 0.0.16
Reflection for serializing/deserializing with RapidJSON
|
The JsonSerializable class provides the CRTP-base for (de)serializable objects. More...
#include <serializable.h>
Public Member Functions | |
void | push (RAPIDJSON_NAMESPACE::Value &container) |
Pushes the object to the specified RapidJSON array. | |
void | push (RAPIDJSON_NAMESPACE::Value &container, const char *name) |
Pushes the object to the specified RapidJSON object as a member with the specified name. | |
RAPIDJSON_NAMESPACE::StringBuffer | toJson () const |
Converts the object to its JSON representation (rapidjson::StringBuffer). | |
RAPIDJSON_NAMESPACE::Document | toJsonDocument () const |
Converts the object to its JSON representation (rapidjson::Document). | |
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. | |
static Type | fromJson (const char *json, JsonDeserializationErrors *errors=nullptr) |
Constructs a new object from the specified JSON. | |
static Type | fromJson (const std::string &json, JsonDeserializationErrors *errors=nullptr) |
Constructs a new object from the specified JSON. | |
Static Public Attributes | |
static constexpr const char * | qualifiedName = "ReflectiveRapidJSON::JsonSerializable" |
The JsonSerializable class provides the CRTP-base for (de)serializable objects.
Definition at line 21 of file serializable.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 85 of file serializable.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 77 of file serializable.h.
|
static |
Constructs a new object from the specified JSON.
Definition at line 93 of file serializable.h.
void ReflectiveRapidJSON::JsonSerializable< Type >::push | ( | RAPIDJSON_NAMESPACE::Value & | container | ) |
Pushes the object to the specified RapidJSON array.
Definition at line 43 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 51 of file serializable.h.
RAPIDJSON_NAMESPACE::StringBuffer ReflectiveRapidJSON::JsonSerializable< Type >::toJson | ( | ) | const |
Converts the object to its JSON representation (rapidjson::StringBuffer).
Definition at line 60 of file serializable.h.
RAPIDJSON_NAMESPACE::Document ReflectiveRapidJSON::JsonSerializable< Type >::toJsonDocument | ( | ) | const |
Converts the object to its JSON representation (rapidjson::Document).
Definition at line 69 of file serializable.h.
|
staticconstexpr |
Definition at line 33 of file serializable.h.