jsonItem

Obtain one parsing item from the given iopipe. This has no notion of context, so it does not actually validate the overall structure of the JSON stream. It only confirms that the next item is a valid JSON item.

jsonItem
(
bool replaceEscapes = true
Chain
)
(
ref Chain c
,
ref size_t pos
)

Parameters

replaceEscapes

Boolean passed to string parser to specify how escapes should be handled. See parseString for details.

c Chain

iopipe from which to parse item. If needed, it may be extended.

pos size_t

Current position in the iopipe's window from which the next item should start. Leading whitespace is allowed.

Return Value

Type: JSONItem

If the stream contains a valid JSON item, the details about that item are returned. If the stream does not contain any more items, then EOF is returned. If there is an error parsing data from the stream for any reason, then Error is returned.

Meta