|
BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
|
#include <json.hpp>
Public Member Functions | |
| 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 | |
| for (std::size_t i=0;i< s.size();++i) | |
| if (JSON_HEDLEY_LIKELY(state==UTF8_ACCEPT)) | |
Public Attributes | |
| JSON_PRIVATE_UNLESS_TESTED | : void dump_escaped(const string_t& s |
| JSON_PRIVATE_UNLESS_TESTED const bool | ensure_ascii |
| std::uint8_t | state = UTF8_ACCEPT |
| std::size_t | bytes = 0 |
| std::size_t | bytes_after_last_accept = 0 |
| std::size_t | undumped_chars = 0 |
| else | |
| *a *(hopefully) large enough character buffer std the locale const std::lconv * | loc = nullptr |
| *the locale s thousand separator character const char | thousands_sep = '\0' |
| *the locale s decimal point character const char | decimal_point = '\0' |
| *string buffer std::array< char, 512 > | string_buffer {{}} |
| *the indentation character const char | indent_char |
| *the indentation string string_t | indent_string |
| *error_handler how to react on decoding errors const error_handler_t | error_handler |
Private Types | |
| using | string_t = typename BasicJsonType::string_t |
| using | number_float_t = typename BasicJsonType::number_float_t |
| using | number_integer_t = typename BasicJsonType::number_integer_t |
| using | number_unsigned_t = typename BasicJsonType::number_unsigned_t |
| using | binary_char_t = typename BasicJsonType::binary_t::value_type |
Static Private Attributes | |
| static constexpr std::uint8_t | UTF8_ACCEPT = 0 |
| static constexpr std::uint8_t | UTF8_REJECT = 1 |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
| [in] | s | output stream to serialize to |
| [in] | ichar | indentation character to use |
| [in] | error_handler_ | how to react on decoding errors |
Definition at line 15129 of file json.hpp.
References decimal_point, error_handler, indent_char, indent_string, loc, nlohmann::detail::strict, and thousands_sep.
Referenced by serializer(), serializer(), operator=(), and operator=().
|
delete |
|
delete |
|
default |
|
inline |
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.
| [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) |
Definition at line 15170 of file json.hpp.
References nlohmann::detail::array, nlohmann::BasicJsonType(), nlohmann::detail::binary, nlohmann::detail::boolean, nlohmann::detail::discarded, dump(), ensure_ascii, i, indent_string, JSON_ASSERT, JSON_HEDLEY_UNLIKELY, nlohmann::detail::null, nlohmann::detail::number_float, nlohmann::detail::number_integer, nlohmann::detail::number_unsigned, nlohmann::detail::object, and nlohmann::detail::string.
Referenced by dump().
|
inline |
Definition at line 15420 of file json.hpp.
References nlohmann::BasicJsonType(), bytes, bytes_after_last_accept, nlohmann::detail::type_error::create(), ensure_ascii, error_handler, i, nlohmann::detail::ignore, JSON_ASSERT, JSON_THROW, nlohmann::detail::replace, state, nlohmann::detail::strict, string_buffer, nlohmann::detail::binary_writer< BasicJsonType, CharType >::to_char_type(), undumped_chars, UTF8_ACCEPT, and UTF8_REJECT.
|
inline |
Definition at line 15597 of file json.hpp.
References bytes, state, string_buffer, and UTF8_ACCEPT.
|
delete |
|
delete |
| JSON_PRIVATE_UNLESS_TESTED nlohmann::detail::serializer< BasicJsonType >::__pad0__ |
| std::size_t nlohmann::detail::serializer< BasicJsonType >::bytes = 0 |
| std::size_t nlohmann::detail::serializer< BasicJsonType >::bytes_after_last_accept = 0 |
| * the locale s decimal point character const char nlohmann::detail::serializer< BasicJsonType >::decimal_point = '\0' |
Definition at line 15951 of file json.hpp.
Referenced by serializer().
| nlohmann::detail::serializer< BasicJsonType >::else |
| JSON_PRIVATE_UNLESS_TESTED const bool nlohmann::detail::serializer< BasicJsonType >::ensure_ascii |
| * error_handler how to react on decoding errors const error_handler_t nlohmann::detail::serializer< BasicJsonType >::error_handler |
Definition at line 15962 of file json.hpp.
Referenced by serializer(), and for().
| * the indentation character const char nlohmann::detail::serializer< BasicJsonType >::indent_char |
Definition at line 15957 of file json.hpp.
Referenced by serializer().
| * the indentation string string_t nlohmann::detail::serializer< BasicJsonType >::indent_string |
Definition at line 15959 of file json.hpp.
Referenced by serializer(), and dump().
| * a* (hopefully) large enough character buffer std the locale const std::lconv* nlohmann::detail::serializer< BasicJsonType >::loc = nullptr |
Definition at line 15947 of file json.hpp.
Referenced by serializer().
| std::uint8_t nlohmann::detail::serializer< BasicJsonType >::state = UTF8_ACCEPT |
| * string buffer std::array<char, 512> nlohmann::detail::serializer< BasicJsonType >::string_buffer {{}} |
| * the locale s thousand separator character const char nlohmann::detail::serializer< BasicJsonType >::thousands_sep = '\0' |
Definition at line 15949 of file json.hpp.
Referenced by serializer().
| std::size_t nlohmann::detail::serializer< BasicJsonType >::undumped_chars = 0 |
|
staticconstexprprivate |
|
staticconstexprprivate |