A streaming JSON parser in C

php.internals

Henrik Skov

6 years ago
Hi internals ! Recently someone enquired about adding a streaming JSON parser to PHP. Therefore, I just wanted to point your attention to a streaming JSON parser implementation in C that might be useful: https://github.com/mnunberg/jsonsl Kind regards, Henrik Skov

Dan Ackroyd

6 years ago
On Wed, 29 Apr 2020 at 21:02, Henrik Skov <henry.wood.dk@gmail.com> wrote:
> > Hi internals ! > > Recently someone enquired about adding a streaming JSON parser to PHP.
There's also a JSON library that supports SIMD instructions and 'tree walking', although that doesn't appear to be exposed in the PHP extension available for it. https://github.com/crazyxman/simdjson_php https://github.com/simdjson/simdjson My understanding is that FFI could be used to prototype a userland API for testing different underlying JSON libraries, if anyone has the time + energy. cheers Dan Ack

Aran Reeks

6 years ago
it would be amazing to see something like this introduced into PHP natively in the future. On Wed, 29 Apr 2020, 21:52 Dan Ackroyd, <Danack@basereality.com> wrote: