JW_BOOL
- Macro
- August 22, 2025
Table of Contents
JW_BOOL
JW_BOOL
Description
Append a boolean value to the JSON as unquoted true/false.
Parameters
Name | Direction | Description |
---|---|---|
j | in,out | The target string to append to. |
b | in | Boolean value. |
Usage example (from documentation)
JW_BOOL(json, true);
Success
Appends “true” or “false” as unquoted boolean
Failure
Does not return on failure
Usage example (Cross-references)
- In
JSON.h:954
:
} \
StrAppendf(&(j), "\"%s\":", k); \
JW_BOOL(j, b); \
} while (0)
JW_ARR_KV(json, "numbers", numbers, num, { JW_INT(json, num); });
JW_ARR_KV(json, "strings", strings, str, { JW_STR(json, str); });
JW_ARR_KV(json, "booleans", booleans, b, { JW_BOOL(json, b); });
});
- In
RoundTrip.c:553
:
});
JW_ARR_KV(json, "numbers", original.numbers, num, { JW_INT(json, num); });
JW_ARR_KV(json, "flags", original.flags, flag, { JW_BOOL(json, flag); });
});