phpscript

manual

ClassGo

JSON\Decoder

class JSON\Decoder {

}

Description

JSON\Decoder returns a decoder reading from $stream.

UseNumber is on, as in json_decode(): without it Go reads every number as a float, and the 7 in a document would come back as 7.0. With it a whole number is an int and only a fractional one is a float, as php answers and what a row written back out has to preserve.

JSON\Decoder is a class phpscript declares.

$object = new JSON\Decoder($stream);

Methods

public function decode(): mixed

decode reads the next value from the stream, throwing at the end of it.

The go method Decode.

public function more(): bool

more reports another value waiting in the stream, ending a decode loop.

The go method More.

Binding

See also