JReadBool
- Function
- August 22, 2025
Table of Contents
JReadBool
JReadBool
Description
Read a boolean value (“true” or “false”) from input string.
Parameters
Name | Direction | Description |
---|---|---|
si | in | Current reading position in input string |
b | out | Pointer to bool to store parsed result |
Success
Returns StrIter
advanced past parsed boolean
Failure
Returns original StrIter
if invalid or unrecognized value
Usage example (Cross-references)
- In
JSON.h:354
:
do { \
bool my_b = 0; \
si = JReadBool((si), &my_b); \
(b) = my_b; \
} while (0)
- In
JSON.h:377
:
if (!StrCmpZstr(&key, (k))) { \
bool my_b = 0; \
si = JReadBool((si), &my_b); \
(b) = my_b; \
} \
- In
JSON.c:459
:
}
StrIter JReadBool(StrIter si, bool* b) {
if (!StrIterRemainingLength(&si)) {
return si;
- In
JSON.c:556
:
StrIter before_si = si;
bool b;
si = JReadBool(si, &b);
if (si.pos == before_si.pos) {