Reflection for RapidJSON
0.0.5
Reflection for serializing/deserializing with RapidJSON
|
Namespaces | |
JsonReflector | |
The JsonReflector namespace contains helper functions to ease the use of RapidJSON for automatic (de)serialization. | |
Classes | |
struct | AdaptedJsonSerializable |
The AdaptedJsonSerializable class allows considering 3rd party classes as serializable. More... | |
struct | JsonDeserializationError |
The JsonDeserializationError struct describes any errors of fromJson() except such caused by invalid JSON. More... | |
struct | JsonDeserializationErrors |
The JsonDeserializationErrors struct can be passed to fromJson() for error handling. More... | |
struct | JsonSerializable |
The JsonSerializable class provides the CRTP-base for (de)serializable objects. More... | |
Enumerations | |
enum | JsonDeserializationErrorKind : byte { JsonDeserializationErrorKind::TypeMismatch, JsonDeserializationErrorKind::ArraySizeMismatch, JsonDeserializationErrorKind::ConversionError, JsonDeserializationErrorKind::UnexpectedDuplicate } |
The JsonDeserializationErrorKind enum specifies which kind of error happend when populating variables from parsing results. More... | |
enum | JsonType : byte { JsonType::Null, JsonType::Number, JsonType::Bool, JsonType::String, JsonType::Array, JsonType::Object } |
The JsonType enum specifies the JSON data type. More... | |
Functions | |
template<typename Type , Traits::EnableIf< std::is_base_of< JsonSerializable< Type >, Type >> * = nullptr> | |
JsonSerializable< Type > & | as (Type &serializable) |
Helps to disambiguate when inheritance is used. More... | |
template<typename Type , Traits::EnableIf< std::is_base_of< JsonSerializable< Type >, Type >> * = nullptr> | |
const JsonSerializable< Type > & | as (const Type &serializable) |
Helps to disambiguate when inheritance is used. More... | |
template<typename Type , Traits::EnableIf< Traits::Not< std::is_same< Type, bool >>, Traits::Any< std::is_integral< Type >, std::is_floating_point< Type >>> * = nullptr> | |
constexpr JsonType | jsonType () |
constexpr JsonType | jsonType (RAPIDJSON_NAMESPACE::Type type) |
Maps the type info provided by RapidJSON to JsonType. More... | |
constexpr JsonDeserializationErrors::ThrowOn | operator| (JsonDeserializationErrors::ThrowOn lhs, JsonDeserializationErrors::ThrowOn rhs) |
Combines to ThrowOn values. More... | |
|
strong |
The JsonDeserializationErrorKind enum specifies which kind of error happend when populating variables from parsing results.
Definition at line 24 of file errorhandling.h.
|
strong |
The JsonType enum specifies the JSON data type.
Enumerator | |
---|---|
Null | |
Number | |
Bool | |
String | |
Array | |
Object |
Definition at line 35 of file errorhandling.h.
JsonSerializable<Type>& ReflectiveRapidJSON::as | ( | Type & | serializable | ) |
Helps to disambiguate when inheritance is used.
Definition at line 87 of file serializable.h.
const JsonSerializable<Type>& ReflectiveRapidJSON::as | ( | const Type & | serializable | ) |
Helps to disambiguate when inheritance is used.
Definition at line 96 of file serializable.h.
constexpr JsonType ReflectiveRapidJSON::jsonType | ( | ) |
Definition at line 48 of file errorhandling.h.
constexpr JsonType ReflectiveRapidJSON::jsonType | ( | RAPIDJSON_NAMESPACE::Type | type | ) |
Maps the type info provided by RapidJSON to JsonType.
Definition at line 85 of file errorhandling.h.
constexpr JsonDeserializationErrors::ThrowOn ReflectiveRapidJSON::operator| | ( | JsonDeserializationErrors::ThrowOn | lhs, |
JsonDeserializationErrors::ThrowOn | rhs | ||
) |
Combines to ThrowOn values.
Definition at line 187 of file errorhandling.h.