CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
JSON Output Flags

Macros

#define JSON_Indent(x)   (x & JSON_Indent_Mask)
 

Enumerations

enum  JSON_OUT_FLAGS {
  JSON_Indent_Mask = 0x0000001f , JSON_Compact = 0x00000100 , JSON_Single_Line = 0x00000200 , JSON_ASCII_Only = 0x00000400 ,
  JSON_Unix_EOL = 0x00010000 , JSON_Windows_EOL = 0x00020000 , JSON_Pretty = 0x00000004 , JSON_Minimal = 0x00000300
}
 JSON output formatting flags. More...
 

Detailed Description

Configuration flags for JSON output formatting.

Macro Definition Documentation

◆ JSON_Indent

#define JSON_Indent (   x)    (x & JSON_Indent_Mask)

Helper macro to create indent flags

Use this to specify a custom number of spaces for indentation.

Example: JSON_Indent(2) for 2-space indent

Definition at line 40 of file jsonout.h.

Enumeration Type Documentation

◆ JSON_OUT_FLAGS

JSON output formatting flags.

Enumerator
JSON_Indent_Mask 

Mask for extracting indent value (0-31 spaces)

JSON_Compact 

Omit spaces around { }, [ ], and : for compact output.

JSON_Single_Line 

Do not insert newlines (causes indent to be ignored)

JSON_ASCII_Only 

Escape all non-ASCII characters in output.

JSON_Unix_EOL 

Force Unix-style line endings (LF) regardless of OS.

JSON_Windows_EOL 

Force Windows-style line endings (CRLF) regardless of OS.

JSON_Pretty 

Preset: 4-space indent with newlines (readable output)

JSON_Minimal 

Preset: Compact single-line output (minimal size)

Definition at line 43 of file jsonout.h.