nfx-json 1.5.2
Modern C++20 JSON library with schema validation and generation
Loading...
Searching...
No Matches
nfx::json::Builder::Options Struct Reference

Configuration options for Builder. More...

#include <nfx/json/Builder.h>

Public Attributes

int indent = 0
 Indentation level (0 = compact, >0 = pretty print with N spaces per level).
size_t bufferSize = 4096
 Initial buffer capacity hint.
bool escapeNonAscii = false
 Escape non-ASCII UTF-8 characters as \uXXXX escape sequences.

Detailed Description

Configuration options for Builder.

Definition at line 71 of file Builder.h.

Member Data Documentation

◆ bufferSize

size_t nfx::json::Builder::Options::bufferSize = 4096

Initial buffer capacity hint.

Definition at line 77 of file Builder.h.

◆ escapeNonAscii

bool nfx::json::Builder::Options::escapeNonAscii = false

Escape non-ASCII UTF-8 characters as \uXXXX escape sequences.

When enabled, Unicode code points > U+007F are encoded as JSON escape sequences.

  • Basic Multilingual Plane (U+0000 to U+FFFF): encoded as \uXXXX
  • Supplementary planes (U+10000 to U+10FFFF): encoded as UTF-16 surrogate pairs \uXXXX\uXXXX Invalid UTF-8 sequences are escaped byte-by-byte as \u00XX.

Definition at line 85 of file Builder.h.

◆ indent

int nfx::json::Builder::Options::indent = 0

Indentation level (0 = compact, >0 = pretty print with N spaces per level).

Definition at line 74 of file Builder.h.


The documentation for this struct was generated from the following file: