6#include <cx/ssdtree/ssdshared.h>
9typedef struct JSONOut JSONOut;
40#define JSON_Indent(x) (x & JSON_Indent_Mask)
115_Ret_valid_ JSONOut*
jsonOutBegin(_Inout_ StreamBuffer* sb, flags_t flags);
138_At_(*jo, _Pre_valid_ _Post_invalid_)
void jsonOutEnd(_Inout_ JSONOut** jo);
198#define jsonOutTree(sb, tree, ...) \
199 _jsonOutTree(sb, tree, opt_flags(__VA_ARGS__), (SSDLockState*)_ssdCurrentLockState)
200bool _jsonOutTree(_Inout_ StreamBuffer* sb, _In_ SSDNode* tree, flags_t flags,
201 _Inout_opt_ SSDLockState* _ssdCurrentLockState);
229#define jsonTreeToString(out, tree, ...) \
230 _jsonTreeToString(out, tree, opt_flags(__VA_ARGS__), (SSDLockState*)_ssdCurrentLockState)
231bool _jsonTreeToString(_Inout_
string* out, _In_ SSDNode* tree, flags_t flags,
232 _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)
bool jsonOut(JSONOut *jo, const JSONParseEvent *ev)
JSONOut * jsonOutBegin(StreamBuffer *sb, flags_t flags)
void jsonStrEscape(string *out, strref val, flags_t flags)
Common types for JSON parsing and output.