base: Prettier JSON output / options
- Add flags for indenting with 2, 4, or 8 spaces, still defaulting to tabs if none of those are set. - Don't emit a newline before emitting scalar values in dicts.
This commit is contained in:
@@ -463,7 +463,11 @@ typedef enum heim_json_flags {
|
||||
HEIM_JSON_F_STRICT = 31,
|
||||
HEIM_JSON_F_CNULL2JSNULL = 32,
|
||||
HEIM_JSON_F_TRY_DECODE_DATA = 64,
|
||||
HEIM_JSON_F_ONE_LINE = 128
|
||||
HEIM_JSON_F_ONE_LINE = 128,
|
||||
/* The default is to indent with one tab */
|
||||
HEIM_JSON_F_INDENT2 = 256,
|
||||
HEIM_JSON_F_INDENT4 = 512,
|
||||
HEIM_JSON_F_INDENT8 = 1024,
|
||||
} heim_json_flags_t;
|
||||
|
||||
heim_object_t heim_json_create(const char *, size_t, heim_json_flags_t,
|
||||
|
Reference in New Issue
Block a user