class · System.Text

JsonReader

public class System.Text.JsonReader : System.Any

Reads a value from UTF-8 units. Arrays and objects nest at most MaxDepth deep (a FormatError beyond).

Kind
class
Namespace
System.Text
Assembly
System.Core
Access
public, final
Source file
Json.ant

Inheritance

Base classes
Any JsonReader

Constructors

constructor JsonReader(units: u8[])
#

Properties

property AtEnd: bool
#

read-only

Methods

method Fail(what: System.String<u8>) -> void
#
method SkipSpace() -> void
#
method ReadValue() -> System.Text.JsonValue
#
method ExpectWord(word: System.String<u8>) -> void
#
method ReadNumber() -> System.Text.JsonValue
#

A number by the JSON grammar: -?, 0 or digits not starting with one, a fraction . digits, an exponent e/E, a sign, digits (no leading zeros, no 1., no .5).

method Digits() -> i32
#

Past the digits here; how many there were.

method ReadText() -> System.String<u8>
#
method ReadKey() -> System.String<u8>
#

An object's key: the string of an earlier key with the same units when there is one.

method ReadHex4() -> u32
#
method ReadArray() -> System.Text.JsonValue
#
method ReadObject() -> System.Text.JsonValue
#

Constants

static constant MaxDepth: i32
#

Private and internal members (8)

field p: u8[]
#

private

field at: i32
#

private

field depth: i32
#

private

field scratch: u8[]
#

private

field used: i32
#

private

field keys: System.String<u8>?[]
#

private

method Enter() -> void
#

private

method Put(unit: u32) -> void
#

private

Inherited members (5)

Source

JsonReader as Larva HIR, decompiled from its Larva HIR.

System.Text.JsonReader.hir
// Reads a value from UTF-8 units. Arrays and objects nest at most MaxDepth deep (a FormatError beyond).
public class System.Text.JsonReader : System.Any
{
    static constant MaxDepth: i32
    field p: u8[]
    field at: i32
    field depth: i32
    field scratch: u8[]
    field used: i32
    field keys: System.String<u8>?[]
    method Enter() -> void
    method Put(unit: u32) -> void
    constructor JsonReader(units: u8[])
    method Fail(what: System.String<u8>) -> void
    method SkipSpace() -> void
    method ReadValue() -> System.Text.JsonValue
    method ExpectWord(word: System.String<u8>) -> void
    // A number by the JSON grammar: `-`?, `0` or digits not starting with one, a fraction `.` digits, an
    // exponent `e`/`E`, a sign, digits (no leading zeros, no `1.`, no `.5`).
    method ReadNumber() -> System.Text.JsonValue
    // Past the digits here; how many there were.
    method Digits() -> i32
    method ReadText() -> System.String<u8>
    // An object's key: the string of an earlier key with the same units when there is one.
    method ReadKey() -> System.String<u8>
    method ReadHex4() -> u32
    method ReadArray() -> System.Text.JsonValue
    method ReadObject() -> System.Text.JsonValue
    property AtEnd: bool
}
Esc