pcrov / jsonreader
JSON Pull Parser
Installs: 849 969
Dependents: 6
Suggesters: 0
Security: 0
Stars: 143
Watchers: 8
Forks: 21
Open Issues: 0
Requires
- php: >=7.3
- ext-intl: *
- pcrov/unicode: ^0.1
- psr/http-message: ^1.0 || ^2.0
Requires (Dev)
- nst/jsontestsuite: ^1
- phpunit/phpunit: ^9.5
README
This is a streaming pull parser - like XMLReader but for JSON.
Requirements
PHP 7.3 or higher with the Intl extension.
Installation
To install with composer:
composer require pcrov/jsonreader
Usage
JsonReader's interface and behavior is very much like XMLReader. If you've worked with that then this will feel familiar.
For examples and API documentation see the wiki.
Note
Only UTF-8 encoded JSON is supported. If you need to parse JSON in another encoding see Handling Non UTF-8 Encodings on the wiki.