6#include <cx/ssdtree/ssdshared.h>
9typedef struct JSONOut JSONOut;
40#define JSON_Indent(x) (x & JSON_Indent_Mask)
110_Ret_opt_valid_ JSONOut*
jsonOutBegin(_Inout_ StreamBuffer* sb, flags_t flags);
133_At_(*jo, _Pre_valid_ _Post_invalid_)
void jsonOutEnd(_Inout_ JSONOut** jo);
171#define jsonOutTree(sb, tree, ...) \
172 _jsonOutTree(sb, tree, opt_flags(__VA_ARGS__), (SSDLockState*)_ssdCurrentLockState)
173bool _jsonOutTree(_Inout_ StreamBuffer* sb, _In_ SSDNode* tree, flags_t flags,
174 _Inout_opt_ SSDLockState* _ssdCurrentLockState);
202#define jsonTreeToString(out, tree, ...) \
203 _jsonTreeToString(out, tree, opt_flags(__VA_ARGS__), (SSDLockState*)_ssdCurrentLockState)
204bool _jsonTreeToString(_Inout_
string* out, _In_ SSDNode* tree, flags_t flags,
205 _Inout_opt_ SSDLockState* _ssdCurrentLockState);
JSON_OUT_FLAGS
JSON output formatting flags.
@ JSON_Minimal
Preset: Compact single-line output (minimal size)
@ JSON_Indent_Mask
Mask for extracting indent value (0-31 spaces)
@ JSON_Pretty
Preset: 4-space indent with newlines (readable output)
@ JSON_Compact
Omit spaces around { }, [ ], and : for compact output.
@ JSON_Windows_EOL
Force Windows-style line endings (CRLF) regardless of OS.
@ JSON_Unix_EOL
Force Unix-style line endings (LF) regardless of OS.
@ JSON_Single_Line
Do not insert newlines (causes indent to be ignored)
@ JSON_ASCII_Only
Escape all non-ASCII characters in output.
void jsonOutEnd(JSONOut **jo)
JSONOut * jsonOutBegin(StreamBuffer *sb, flags_t flags)
bool jsonOut(JSONOut *jo, JSONParseEvent *ev)
Common types for JSON parsing and output.