JsonStreamParser.tryParse

JsonStreamResult tryParse(out var value, out JsonError err) @safe

Attempt to parse the buffered data as a single JSON root value.

Container roots (`{...}`, `[...]`) and closed scalars commit as soon as they are complete. A root-level number is only committed after finish has been called, because further digits could still arrive and extend the token; until then NEED_MORE is returned.

Parameters

valueParsed value on OK; var.init otherwise.
errPopulated on ERROR; JsonError.init otherwise.

Returns

NEED_MORE if more input is needed, OK on success, or ERROR on failure.