Constructor taking a string for fast slicing.
Constructor taking a const char[].
An alias to the singleKey method. Instead of json.singleKey!"something" you can write json.something. Read the notes on singleKey.
Reads a string off the JSON text with limited lifetime.
Selects from a set of given keys in an object and calls the corresponding delegate. The difference to singleKey when invoked with a single key is that keySwitch will not error out if the key is non-existent and may trigger the delegate multiple times, if the JSON object has duplicate keys.
Iterate over a JSON array via foreach.
Reads a string off the JSON text.
Reads an enumeration off the JSON text.
Reads a number off the JSON text.
Reads a plain old data struct off the JSON text.
Reads a plain old data struct or null off the JSON text.
Reads an associative-array off a JSON text.
Reads a dynamic array off the JSON text.
Reads a static array off the JSON text.
Reads a boolean value off the JSON text.
Reads null off the JSON text.
Skips the next JSON value if you are not interested.
Iterate the keys of a JSON object with foreach.
Returns the type of data that is up next in the JSON text.
Skips all keys of an object except the first occurence with the given key name.
Save or restore the parser's internal state.
This is a forward JSON parser for picking off items of interest on the go. It neither produces a node structure, nor does it produce events. Instead you can peek at the value type that lies ahead and/or directly consume a JSON value from the parser. Objects and arrays can be iterated over via foreach, while you can also directly ask for one or multiple keys of an object.
Prams: vl = Validation level. Any of trustedSource, validateUsed or validateAll. validateUtf8 = If validation is enabled, this also checks UTF-8 encoding of JSON strings.