|
pjson 1.0.0
A small, owning JSON value for C++11
|
Controls JSON serialization. The default produces the same compact, ascending-key output as toString()/write() without options. Pretty output places each array element/object member on its own line. Only space and tab are valid indentation characters; any other value is treated as a space so serialization always remains valid JSON. More...
#include <pjson.h>
Public Types | |
| enum | KeyOrder { AscendingKeys , DescendingKeys } |
| Selects one of the public JSON policies. More... | |
Public Member Functions | |
| SerializeOptions () | |
Public API member SerializeOptions; see the API overview for its contract. / Returns the defaults with pretty printing enabled. | |
Static Public Member Functions | |
| static SerializeOptions | prettyPrinted () |
Public API member prettyPrinted; see the API overview for its contract. | |
Public Attributes | |
| bool | pretty |
Public API member pretty; see the API overview for its contract. | |
| size_t | indentWidth |
Public API member indentWidth; see the API overview for its contract. | |
| char | indentCharacter |
Public API member indentCharacter; see the API overview for its contract. | |
| bool | escapeNonAscii |
Public API member escapeNonAscii; see the API overview for its contract. | |
| KeyOrder | keyOrder |
Public API member keyOrder; see the API overview for its contract. | |
| size_t | maxOutputBytes |
| default 64 MiB; zero explicitly means unlimited | |
Controls JSON serialization. The default produces the same compact, ascending-key output as toString()/write() without options. Pretty output places each array element/object member on its own line. Only space and tab are valid indentation characters; any other value is treated as a space so serialization always remains valid JSON.
Objects are stored in std::map, so source/insertion order is not available. Key ordering is therefore explicitly ascending or descending according to std::map's bytewise std::string ordering.
| ByteDance::pjson::SerializeOptions::SerializeOptions | ( | ) |
Public API member SerializeOptions; see the API overview for its contract. / Returns the defaults with pretty printing enabled.
|
static |
Public API member prettyPrinted; see the API overview for its contract.
| bool ByteDance::pjson::SerializeOptions::escapeNonAscii |
| char ByteDance::pjson::SerializeOptions::indentCharacter |
| size_t ByteDance::pjson::SerializeOptions::indentWidth |
| KeyOrder ByteDance::pjson::SerializeOptions::keyOrder |
| size_t ByteDance::pjson::SerializeOptions::maxOutputBytes |
| bool ByteDance::pjson::SerializeOptions::pretty |