JSON format: serialization and deserialization of values with options.
More...
#include <format.hpp>
|
| static constexpr std::string_view | MEDIA_TYPE = "application/json" |
JSON format: serialization and deserialization of values with options.
It is the format type used by generic codecs ( anch::codec::FormatCodec , anch-codec): it does not depend on them (its members follow the anch::codec::DataFormat concept).
- Author
- Vincent Lachenal
- Since
- 0.3
◆ Options
◆ defaultOptions()
◆ deserialize()
| void anch::json::JsonFormat::deserialize |
( |
T & | value, |
|
|
std::istream & | input, |
|
|
const Options & | options ) |
|
static |
Deserialize value
- Parameters
-
| value | the value to fill |
| input | the input stream |
| options | the options |
- Exceptions
-
◆ serialize()
| void anch::json::JsonFormat::serialize |
( |
const T & | value, |
|
|
std::ostream & | out, |
|
|
const Options & | options ) |
|
static |
Serialize value
- Parameters
-
| value | the value (described object, collection, map, primitive, ...) |
| out | the output stream |
| options | the options |
- Exceptions
-
◆ MEDIA_TYPE
| std::string_view anch::json::JsonFormat::MEDIA_TYPE = "application/json" |
|
staticconstexpr |
The documentation for this struct was generated from the following file: