mirror of
https://github.com/nlohmann/json.git
synced 2026-10-03 22:06:59 +01:00
deploy: 63c10a51fc
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -13,11 +13,11 @@ using json_serializer = JSONSerializer<T, SFINAE>;
|
||||
|
||||
## Notes
|
||||
|
||||
#### Default type
|
||||
### Default type
|
||||
|
||||
The default values for `json_serializer` is [`adl_serializer`](https://json.nlohmann.me/api/adl_serializer/index.md).
|
||||
|
||||
#### Requirements
|
||||
### Requirements
|
||||
|
||||
A custom serializer must provide `static void to_json(basic_json&, T)` for every type it serializes, and either `static void from_json(const basic_json&, T&)` or `static T from_json(const basic_json&)` for every type it deserializes. See [Template Parameter Requirements](https://json.nlohmann.me/features/types/template_parameters/#jsonserializer).
|
||||
|
||||
@@ -89,6 +89,13 @@ Output:
|
||||
Ned Flanders (60) lives in 744 Evergreen Terrace
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [adl_serializer](https://json.nlohmann.me/api/adl_serializer/index.md) the default `json_serializer`
|
||||
- [get](https://json.nlohmann.me/api/basic_json/get/index.md) explicit type conversion using the `json_serializer`'s `from_json()` method
|
||||
- [get_to](https://json.nlohmann.me/api/basic_json/get_to/index.md) explicit type conversion into a variable using the `json_serializer`'s `from_json()` method
|
||||
- [Arbitrary Type Conversions](https://json.nlohmann.me/features/arbitrary_types/index.md) - the article on converting between JSON values and arbitrary types
|
||||
|
||||
## Version history
|
||||
|
||||
- Since version 2.0.0.
|
||||
|
||||
Reference in New Issue
Block a user