Skip to content

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)

Usage examples (Cross-references)
            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); });
        });
            });
            JW_ARR_KV(json, "numbers", original.numbers, num, { JW_INT(json, num); });
            JW_ARR_KV(json, "flags", original.flags, flag, { JW_BOOL(json, flag); });
        });
            }                                                                                                              \
            StrAppendf(&(j), "\"%s\":", k);                                                                                \
            JW_BOOL(j, b);                                                                                                 \
        } while (0)
Last updated on