JR_BOOL

Table of Contents

JR_BOOL

Description

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

Parameters

NameDirectionDescription
siin,outJSON stream iterator to read from.
boutBoolean 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)

    JR_ARR_KV(si, "flags", {
    bool flag = false;
    JR_BOOL(si, flag);
    VecPushBack(&parsed.flags, flag);
    });

Share :

Related Posts

JR_INT_KV

JR_INT_KV Description Read an integer key-value pair if key matches.

Read More

JSkipValue

JSkipValue Description Skip the current JSON value at reading position.

Read More

JR_FLT

JR_FLT Description Read a JSON float value from stream and assign to target.

Read More