SIRIUS 7.5.0
Electronic structure library and applications
|
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 |
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... | |
for (std::size_t i=0;i< s.size();++i) | |
if (JSON_HEDLEY_LIKELY(state==UTF8_ACCEPT)) | |
Public Attributes | |
JSON_PRIVATE_UNLESS_TESTED | __pad0__: 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 | |
std::array< char, 64 > | number_buffer {{}} |
a (hopefully) large enough character buffer More... | |
const std::lconv * | loc = nullptr |
the locale More... | |
const char | thousands_sep = '\0' |
the locale's thousand separator character More... | |
const char | decimal_point = '\0' |
the locale's decimal point character More... | |
std::array< char, 512 > | string_buffer {{}} |
string buffer More... | |
const char | indent_char |
the indentation character More... | |
string_t | indent_string |
the indentation string More... | |
const error_handler_t | error_handler |
error_handler how to react on decoding errors More... | |
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 |
Definition at line 17973 of file nlohmann_json.hpp.
|
private |
Definition at line 17975 of file nlohmann_json.hpp.
|
private |
Definition at line 17976 of file nlohmann_json.hpp.
|
private |
Definition at line 17977 of file nlohmann_json.hpp.
|
private |
Definition at line 17978 of file nlohmann_json.hpp.
|
private |
Definition at line 17979 of file nlohmann_json.hpp.
|
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 17989 of file nlohmann_json.hpp.
|
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.
escape_string()
operator<<
"%g"
format[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 18029 of file nlohmann_json.hpp.
|
inline |
Definition at line 18323 of file nlohmann_json.hpp.
|
inline |
Definition at line 18512 of file nlohmann_json.hpp.
|
staticconstexprprivate |
Definition at line 17980 of file nlohmann_json.hpp.
|
staticconstexprprivate |
Definition at line 17981 of file nlohmann_json.hpp.
JSON_PRIVATE_UNLESS_TESTED detail::serializer< BasicJsonType >::__pad0__ |
Definition at line 18298 of file nlohmann_json.hpp.
JSON_PRIVATE_UNLESS_TESTED const bool detail::serializer< BasicJsonType >::ensure_ascii |
Definition at line 18313 of file nlohmann_json.hpp.
std::uint8_t detail::serializer< BasicJsonType >::state = UTF8_ACCEPT |
Definition at line 18316 of file nlohmann_json.hpp.
std::size_t detail::serializer< BasicJsonType >::bytes = 0 |
Definition at line 18317 of file nlohmann_json.hpp.
std::size_t detail::serializer< BasicJsonType >::bytes_after_last_accept = 0 |
Definition at line 18320 of file nlohmann_json.hpp.
std::size_t detail::serializer< BasicJsonType >::undumped_chars = 0 |
Definition at line 18321 of file nlohmann_json.hpp.
detail::serializer< BasicJsonType >::else |
Definition at line 18520 of file nlohmann_json.hpp.
std::array<char, 64> detail::serializer< BasicJsonType >::number_buffer {{}} |
a (hopefully) large enough character buffer
Definition at line 18888 of file nlohmann_json.hpp.
const std::lconv* detail::serializer< BasicJsonType >::loc = nullptr |
the locale
Definition at line 18891 of file nlohmann_json.hpp.
const char detail::serializer< BasicJsonType >::thousands_sep = '\0' |
the locale's thousand separator character
Definition at line 18893 of file nlohmann_json.hpp.
const char detail::serializer< BasicJsonType >::decimal_point = '\0' |
the locale's decimal point character
Definition at line 18895 of file nlohmann_json.hpp.
std::array<char, 512> detail::serializer< BasicJsonType >::string_buffer {{}} |
string buffer
Definition at line 18898 of file nlohmann_json.hpp.
const char detail::serializer< BasicJsonType >::indent_char |
the indentation character
Definition at line 18901 of file nlohmann_json.hpp.
string_t detail::serializer< BasicJsonType >::indent_string |
the indentation string
Definition at line 18903 of file nlohmann_json.hpp.
const error_handler_t detail::serializer< BasicJsonType >::error_handler |
error_handler how to react on decoding errors
Definition at line 18906 of file nlohmann_json.hpp.