JSONItem

JSON item from a specific iopipe. This is like a slice into the iopipe, but only contains offsets so as to make it easy to manipulate. No whitespace is included. Strings do not include the surrounding quotes.

Members

Functions

data
auto data(Chain c)

Given an iopipe from which this token came, returns the exact window data for the item.

Variables

hint
JSONParseHint hint;

A parsing hint on what is inside the item. This is determined for Strings or Numbers during validation. Other token types do not set this member to anything.

length
size_t length;

Length of the item.

offset
size_t offset;

If the token is a standard token, offset into the current iopipe window of where this item begins. If you release data from the beginning, this can be updated manually by subtracting the number of items released.

token
JSONToken token;

The type of token this item contains.

Meta