Skip to content

JR_BOOL

JR_BOOL

Description

Read a JSON boolean value from stream and assign to target.

Parameters

Name Direction Description
si in,out JSON stream iterator to read from.
b out Boolean variable to store the value.

Usage example (from documentation)

  JR_BOOL(si, is_active);

Success

b contains the parsed boolean

Failure

si updated to failure state on parse error

Usage example (Cross-references)

Usage examples (Cross-references)
            JR_ARR_KV(si, "flags", {
                bool flag = false;
                JR_BOOL(si, flag);
                VecPushBack(&parsed.flags, flag);
            });
Last updated on