#include <json.hpp>
|
| | serializer (output_adapter_t< char > s, const char ichar, error_handler_t error_handler_=error_handler_t::strict) |
| |
| | serializer (const serializer &)=delete |
| |
| serializer & | operator= (const serializer &)=delete |
| |
| | serializer (serializer &&)=delete |
| |
| serializer & | operator= (serializer &&)=delete |
| |
| | ~serializer ()=default |
| |
| void | dump (const BasicJsonType &val, const bool pretty_print, const bool ensure_ascii, const unsigned int indent_step, const unsigned int current_indent=0) |
| | internal implementation of the serialization function More...
|
| |
| | serializer (output_adapter_t< char > s, const char ichar, error_handler_t error_handler_=error_handler_t::strict) |
| |
| | serializer (const serializer &)=delete |
| |
| serializer & | operator= (const serializer &)=delete |
| |
| | serializer (serializer &&)=delete |
| |
| serializer & | operator= (serializer &&)=delete |
| |
| | ~serializer ()=default |
| |
| void | dump (const BasicJsonType &val, const bool pretty_print, const bool ensure_ascii, const unsigned int indent_step, const unsigned int current_indent=0) |
| | internal implementation of the serialization function More...
|
| |
◆ serializer() [1/6]
template<typename BasicJsonType >
- Parameters
-
| [in] | s | output stream to serialize to |
| [in] | ichar | indentation character to use |
| [in] | error_handler_ | how to react on decoding errors |
◆ serializer() [2/6]
template<typename BasicJsonType >
◆ serializer() [3/6]
template<typename BasicJsonType >
◆ ~serializer() [1/2]
template<typename BasicJsonType >
◆ serializer() [4/6]
template<typename BasicJsonType >
- Parameters
-
| [in] | s | output stream to serialize to |
| [in] | ichar | indentation character to use |
| [in] | error_handler_ | how to react on decoding errors |
◆ serializer() [5/6]
template<typename BasicJsonType >
◆ serializer() [6/6]
template<typename BasicJsonType >
◆ ~serializer() [2/2]
template<typename BasicJsonType >
◆ dump() [1/2]
template<typename BasicJsonType >
| void nlohmann::detail::serializer< BasicJsonType >::dump |
( |
const BasicJsonType & |
val, |
|
|
const bool |
pretty_print, |
|
|
const bool |
ensure_ascii, |
|
|
const unsigned int |
indent_step, |
|
|
const unsigned int |
current_indent = 0 |
|
) |
| |
|
inline |
internal implementation of the serialization function
This function is called by the public member function dump and organizes the serialization internally. The indentation level is propagated as additional parameter. In case of arrays and objects, the function is called recursively.
- strings and object keys are escaped using
escape_string()
- integer numbers are converted implicitly via
operator<<
- floating-point numbers are converted to a string using
"%g" format
- Parameters
-
| [in] | val | value to serialize |
| [in] | pretty_print | whether the output shall be pretty-printed |
| [in] | indent_step | the indent level |
| [in] | current_indent | the current indent level (only used internally) |
◆ dump() [2/2]
template<typename BasicJsonType >
| void nlohmann::detail::serializer< BasicJsonType >::dump |
( |
const BasicJsonType & |
val, |
|
|
const bool |
pretty_print, |
|
|
const bool |
ensure_ascii, |
|
|
const unsigned int |
indent_step, |
|
|
const unsigned int |
current_indent = 0 |
|
) |
| |
|
inline |
internal implementation of the serialization function
This function is called by the public member function dump and organizes the serialization internally. The indentation level is propagated as additional parameter. In case of arrays and objects, the function is called recursively.
- strings and object keys are escaped using
escape_string()
- integer numbers are converted implicitly via
operator<<
- floating-point numbers are converted to a string using
"%g" format
- binary values are serialized as objects containing the subtype and the byte array
- Parameters
-
| [in] | val | value to serialize |
| [in] | pretty_print | whether the output shall be pretty-printed |
| [in] | ensure_ascii | If ensure_ascii is true, all non-ASCII characters in the output are escaped with \uXXXX sequences, and the result consists of ASCII characters only. |
| [in] | indent_step | the indent level |
| [in] | current_indent | the current indent level (only used internally) |
◆ operator=() [1/4]
template<typename BasicJsonType >
◆ operator=() [2/4]
template<typename BasicJsonType >
◆ operator=() [3/4]
template<typename BasicJsonType >
◆ operator=() [4/4]
template<typename BasicJsonType >
The documentation for this class was generated from the following file:
- build/_deps/json-src/include/nlohmann/json.hpp