[#nlohmann-basic_json-0c-dump] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0c.adoc[basic_json]::dump :relfileprefix: ../../ :mrdocs: serialization == Synopsis Declared in `<nlohmann/json.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/basic_json-0c/string_t.adoc[string_t] dump( int const indent = ‐1, char const indent_char = ' ', bool const ensure_ascii = false, xref:nlohmann/basic_json-0c/error_handler_t.adoc[error_handler_t] const error_handler = error_handler_t::strict) const; ---- == Return Value string containing the serialization of the JSON value == Parameters [cols="1,4"] |=== | Name| Description | *indent* | if nonnegative, pretty‐print with this number of indentation spaces per level; if negative (the default), the most compact representation is produced | *indent_char* | character used for indentation if _indent_ is nonnegative | *ensure_ascii* | if `true`, all non‐ASCII characters in the output are escaped with `uXXXX` sequences | *error_handler* | how to handle invalid UTF‐8 sequences encountered while serializing |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#