robertsaupe / php-json
php library for json and jsonc parsing
Fund package maintenance!
robertsaupe
Patreon
Paypal
Amazon
Requires
- php: >=8.2.0
- ext-json: *
- justinrainbow/json-schema: ^5
- seld/jsonlint: ^1
- webmozart/assert: ^1
Requires (Dev)
- phpstan/phpstan: ^1
README
php library for json and jsonc parsing
Supporting
GitHub | Patreon | PayPal | Amazon
Installing
composer require robertsaupe/php-json
Getting started
Json
use robertsaupe\Json\Json; $json = new Json(); print_r($json->decodeFile('path_to_file.json'));
Jsonc
use robertsaupe\Json\Jsonc; $jsonc = new Jsonc(); print_r($jsonc->decodeFile('path_to_file.jsonc'));
Credits
-
box-project/box for basic Json parsing
- Kevin Herrera kevin@herrera.io
- Théo Fidry theo.fidry@gmail.com
-
Alexander Shostak https://stackoverflow.com/a/43439966 for decode commented json