dev-master
9999999-devA streaming JSON parser for Amp.
MIT
The Requires
The Development Requires
v1.0.0
1.0.0.0A streaming JSON parser for Amp.
MIT
The Requires
The Development Requires
Wallogit.com
2017 © Pedro Peláez
A streaming JSON parser for Amp.
A streaming JSON parser for Amp., (*1)
composer require kelunik/streaming-json
$parser = new StreamingJsonParser($inputStream);
while (yield $parser->advance()) {
$parsedItem = $parser->getCurrent();
}
Options can be passed to the constructor just like for json_decode. The parser will consume the passed input stream and is itself an Amp\Iterator that allows consumption of all parsed items. Any malformed message will fail the parser. If the input stream ends, the parser will try to parse the last item and will complete the iterator successfully or fail it, depending on whether the last item was malformed or not., (*2)
A streaming JSON parser for Amp.
MIT
A streaming JSON parser for Amp.
MIT