JSkipValue
Description
Skip the current JSON value at reading position.
Parameters
| Name | Direction | Description |
|---|---|---|
si |
in | Current position in string iterator to skip value from |
Success
Returns updated StrIter after value is skipped
Failure
Returns same StrIter on error (e.g. invalid type)
Usage example (Cross-references)
Usage examples (Cross-references)
- In
JSON.c:77:
// skip values within object
read_si = JSkipValue(si);
// if still no advancement in read position
- In
JSON.c:139:
// skip values within array
read_si = JSkipValue(si);
// if no advancement in read position
- In
JSON.c:584:
}
StrIter JSkipValue(StrIter si) {
if (!StrIterRemainingLength(&si)) {
return si; { reader } \
if (StrIterIndex(&UNPL(si_before_read)) == StrIterIndex(&si)) { \
StrIter UNPL(skip_si) = JSkipValue(si); \
if (StrIterIndex(&UNPL(skip_si)) == StrIterIndex(&si)) { \
LOG_ERROR("Failed to parse value. Invalid JSON."); \
- In
JSON.h:479:
if (StrIterIndex(&UNPL(si_before_read)) == StrIterIndex(&si)) { \
/* skip the value */ \
StrIter UNPL(read_si) = JSkipValue(si); \
\
/* if still no advancement in read position */ \
- In
JSON.h:604:
if (StrIterIndex(&UNPL(si_before_read)) == StrIterIndex(&si)) { \
/* skip the value */ \
UNPL(read_si) = JSkipValue(si); \
\
\
Last updated on