|
JSON Voorhees
Killer JSON for C++
|
Inheritance diagram for jsonv::member_adapter_builder< T, TMember >:
Collaboration diagram for jsonv::member_adapter_builder< T, TMember >:Public Member Functions | |
| member_adapter_builder (formats_builder *fmt_builder, adapter_builder< T > *adapt_builder, detail::member_adapter_impl< T, TMember > *adapter) | |
| member_adapter_builder & | alias (std::string name) |
| When deserializing, also look for this name as a key. | |
| member_adapter_builder & | check (std::function< void(const TMember &)> inspect) |
| member_adapter_builder & | check (std::function< bool(const TMember &)> accept, std::function< void(const TMember &)> thrower) |
| template<typename TException > requires (!std::invocable<TException&, const TMember&>) | |
| member_adapter_builder & | check (std::function< bool(const TMember &)> accept, TException ex) |
Constrained to a TException which cannot be called with the value as a non-const lvalue, which is how std::function calls its target, so a mutable lambda counts as callable. | |
| member_adapter_builder & | default_value (std::function< TMember(deserialization_context &)> create) |
| If the key for this member is not in the object when deserializing, call this function to create a value. | |
| member_adapter_builder & | default_value (TMember value) |
| If the key for this member is not in the object when deserializing, use this value. | |
| member_adapter_builder & | default_on_null (bool on=true) |
Should a kind::null for a key be interpreted as a missing value? Only considered if a default_value was provided; without one, the null is deserialized like any other value. | |
| member_adapter_builder & | serialize_if (std::function< bool(const serialization_context &, const TMember &)> check) |
| Only serialize this member if the check passes. | |
| member_adapter_builder & | since (version ver) |
Only serialize this member if the serialization_context was not created with a version, or its version is greater than or equal to ver. | |
| member_adapter_builder & | until (version ver) |
Only serialize this member if the serialization_context was not created with a version, or its version is less than or equal to ver. | |
| member_adapter_builder & | after (version ver) |
Only serialize this member if the serialization_context was not created with a version, or its version is greater than ver. | |
| member_adapter_builder & | before (version ver) |
Only serialize this member if the serialization_context was not created with a version, or its version is less than ver. | |
Definition at line 1152 of file serialization_builder.hpp.
|
inlineexplicit |
Definition at line 1157 of file serialization_builder.hpp.
|
inline |
Only serialize this member if the serialization_context was not created with a version, or its version is greater than ver.
Definition at line 1264 of file serialization_builder.hpp.
Here is the call graph for this function:
|
inline |
When deserializing, also look for this name as a key.
Definition at line 1169 of file serialization_builder.hpp.
|
inline |
Only serialize this member if the serialization_context was not created with a version, or its version is less than ver.
Definition at line 1275 of file serialization_builder.hpp.
Here is the call graph for this function:
|
inline |
Definition at line 1181 of file serialization_builder.hpp.
|
inline |
Constrained to a TException which cannot be called with the value as a non-const lvalue, which is how std::function calls its target, so a mutable lambda counts as callable.
Without the constraint every thrower lambda would land here, an exact match for TException where the overload above needs a conversion to std::function, and be thrown instead of called.
Definition at line 1200 of file serialization_builder.hpp.
|
inline |
Definition at line 1175 of file serialization_builder.hpp.
|
inline |
Should a kind::null for a key be interpreted as a missing value? Only considered if a default_value was provided; without one, the null is deserialized like any other value.
Definition at line 1225 of file serialization_builder.hpp.
|
inline |
If the key for this member is not in the object when deserializing, call this function to create a value.
If a default_value is not specified, the key is required.
Definition at line 1208 of file serialization_builder.hpp.
|
inline |
If the key for this member is not in the object when deserializing, use this value.
If a default_value is not specified, the key is required.
Definition at line 1217 of file serialization_builder.hpp.
Here is the call graph for this function:
|
inline |
Only serialize this member if the check passes.
The final decision to serialize is based on all check functions.
Definition at line 1234 of file serialization_builder.hpp.
|
inline |
Only serialize this member if the serialization_context was not created with a version, or its version is greater than or equal to ver.
Definition at line 1242 of file serialization_builder.hpp.
Here is the call graph for this function:
|
inline |
Only serialize this member if the serialization_context was not created with a version, or its version is less than or equal to ver.
Definition at line 1253 of file serialization_builder.hpp.
Here is the call graph for this function: