JSkipValue

Table of Contents

JSkipValue

Description

Skip the current JSON value at reading position.

Parameters

NameDirectionDescription
siinCurrent 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)

    if (si_before_read.pos == si.pos) {                                                                        \
    /* skip the value */                                                                                   \
    StrIter read_si = JSkipValue(si);                                                                      \
    \
    /* if still no advancement in read position */                                                         \
    if (si_before_read.pos == si.pos) {                                                                        \
    /* skip the value */                                                                                   \
    StrIter read_si = JSkipValue(si);                                                                      \
    \
    \
    
    // skip values within object
    read_si = JSkipValue(si);
    
    // if still no advancement in read position
    
    // skip values within array
    read_si = JSkipValue(si);
    
    // if no advancement in read position
    }
    
    StrIter JSkipValue(StrIter si) {
    if (!StrIterRemainingLength(&si)) {
    return si;

Share :

Related Posts

JReadNumber

JReadNumber Description Read a JSON number (int or float) from input string.

Read More

JSkipWhitespace

JSkipWhitespace Description Skip whitespace from current reading position.

Read More

LVAL

LVAL Description Creates a temporary, addressable l-value from a given expression x.

Read More