|
Reflection for RapidJSON 0.0.16
Reflection for serializing/deserializing with RapidJSON
|
Namespaces | |
| namespace | BinaryReflector |
| The BinaryReflector namespace contains BinaryReader and BinaryWriter for automatic binary (de)serialization. | |
| namespace | JsonReflector |
| The JsonReflector namespace contains helper functions to ease the use of RapidJSON for automatic (de)serialization. | |
Classes | |
| struct | AdaptedBinarySerializable |
| The AdaptedBinarySerializable class allows considering 3rd party classes as serializable. More... | |
| struct | AdaptedJsonSerializable |
| The AdaptedJsonSerializable class allows considering 3rd party classes as serializable. More... | |
| struct | BinarySerializable |
| The BinarySerializable class provides the CRTP-base for (de)serializable objects. 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... | |
| struct | TreatAsMapOrHash |
| The TreatAsMapOrHash class allows treating custom classes as std::map or std::unordered_map. More... | |
| struct | TreatAsMultiMapOrHash |
| The TreatAsMultiMapOrHash class allows treating custom classes as std::multimap or std::unordered_multimap. More... | |
| struct | TreatAsMultiSet |
| The TreatAsMultiSet class allows treating custom classes as std::multiset or std::unordered_multiset. More... | |
| struct | TreatAsSet |
| The TreatAsSet class allows treating custom classes as std::set or std::unordered_set. More... | |
| struct | Versioning |
| struct | Versioning< Type, true > |
| struct | VersionNotSupported |
Typedefs | |
| template<typename Type > | |
| using | IsMapOrHash = Traits::Any<Traits::IsSpecializationOf<Type, std::map>, Traits::IsSpecializationOf<Type, std::unordered_map>, TreatAsMapOrHash<Type>> |
| template<typename Type > | |
| using | IsMultiMapOrHash |
| template<typename Type > | |
| using | IsSet = Traits::Any<Traits::IsSpecializationOf<Type, std::set>, Traits::IsSpecializationOf<Type, std::unordered_set>, TreatAsSet<Type>> |
| template<typename Type > | |
| using | IsMultiSet = Traits::Any<Traits::IsSpecializationOf<Type, std::multiset>, Traits::IsSpecializationOf<Type, std::unordered_multiset>, TreatAsMultiSet<Type>> |
| template<typename Type > | |
| using | IsArrayOrSet |
| template<typename Type > | |
| using | IsArray |
| template<typename Type > | |
| using | IsIteratableExceptString |
| template<typename Type > | |
| using | IsVariant = Traits::All<Traits::IsSpecializationOf<Type, std::variant>> |
| using | BinaryVersion = std::uint64_t |
| using | BinaryVersionNotSupported = VersionNotSupported<BinaryVersion> |
Enumerations | |
| enum class | JsonDeserializationErrorKind : std::uint8_t { TypeMismatch , ArraySizeMismatch , ConversionError , UnexpectedDuplicate , InvalidVariantObject , InvalidVariantIndex } |
| The JsonDeserializationErrorKind enum specifies which kind of error happend when populating variables from parsing results. More... | |
| enum class | JsonType : std::uint8_t { Null , Number , Bool , String , Array , Object } |
| The JsonType enum specifies the JSON data type. More... | |
Functions | |
| CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK (IsVersioned, T::version) | |
| 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. | |
| 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. | |
| 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. | |
| constexpr JsonDeserializationErrors::ThrowOn | operator| (JsonDeserializationErrors::ThrowOn lhs, JsonDeserializationErrors::ThrowOn rhs) |
| Combines to ThrowOn values. | |
| std::string_view | jsonTypeToString (JsonType jsonType) |
| std::string | formatJsonDeserializationError (const JsonDeserializationError &error) |
| REFLECTIVE_RAPIDJSON_TREAT_AS_MAP_OR_HASH (Foo) | |
| REFLECTIVE_RAPIDJSON_TREAT_AS_MULTI_MAP_OR_HASH (Foo) | |
| REFLECTIVE_RAPIDJSON_TREAT_AS_SET (Bar) | |
| REFLECTIVE_RAPIDJSON_TREAT_AS_MULTI_SET (Foo) | |
| using ReflectiveRapidJSON::BinaryVersion = std::uint64_t |
Definition at line 38 of file reflector.h.
Definition at line 17 of file serializable.h.
| using ReflectiveRapidJSON::IsArray |
| using ReflectiveRapidJSON::IsArrayOrSet |
| using ReflectiveRapidJSON::IsIteratableExceptString |
| using ReflectiveRapidJSON::IsMapOrHash = Traits::Any<Traits::IsSpecializationOf<Type, std::map>, Traits::IsSpecializationOf<Type, std::unordered_map>, TreatAsMapOrHash<Type>> |
| using ReflectiveRapidJSON::IsMultiMapOrHash |
| using ReflectiveRapidJSON::IsMultiSet = Traits::Any<Traits::IsSpecializationOf<Type, std::multiset>, Traits::IsSpecializationOf<Type, std::unordered_multiset>, TreatAsMultiSet<Type>> |
| using ReflectiveRapidJSON::IsSet = Traits::Any<Traits::IsSpecializationOf<Type, std::set>, Traits::IsSpecializationOf<Type, std::unordered_set>, TreatAsSet<Type>> |
| using ReflectiveRapidJSON::IsVariant = Traits::All<Traits::IsSpecializationOf<Type, std::variant>> |
|
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 37 of file errorhandling.h.
| const JsonSerializable< Type > & ReflectiveRapidJSON::as | ( | const Type & | serializable | ) |
Helps to disambiguate when inheritance is used.
Definition at line 110 of file serializable.h.
| JsonSerializable< Type > & ReflectiveRapidJSON::as | ( | Type & | serializable | ) |
Helps to disambiguate when inheritance is used.
Definition at line 101 of file serializable.h.
| ReflectiveRapidJSON::CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK | ( | IsVersioned | , |
| T::version | ) |
|
inline |
Definition at line 37 of file errorformatting.h.
|
constexpr |
Definition at line 50 of file errorhandling.h.
|
constexpr |
Maps the type info provided by RapidJSON to JsonType.
Definition at line 87 of file errorhandling.h.
|
inline |
Definition at line 17 of file errorformatting.h.
|
constexpr |
Combines to ThrowOn values.
Definition at line 197 of file errorhandling.h.
| ReflectiveRapidJSON::REFLECTIVE_RAPIDJSON_TREAT_AS_MAP_OR_HASH | ( | Foo | ) |
| ReflectiveRapidJSON::REFLECTIVE_RAPIDJSON_TREAT_AS_MULTI_MAP_OR_HASH | ( | Foo | ) |
| ReflectiveRapidJSON::REFLECTIVE_RAPIDJSON_TREAT_AS_MULTI_SET | ( | Foo | ) |
| ReflectiveRapidJSON::REFLECTIVE_RAPIDJSON_TREAT_AS_SET | ( | Bar | ) |