soldierm / ndjson
php parse ndjson
Installs: 3 327
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.1
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-09-16 19:32:52 UTC
README
Download
composer require soldierm/ndjson
Usage
Decode ndjson
<?php $ndjson = <<<NDJSON {"foo":"bar"} {"hello":"world"} NDJSON; $decode = \Soldierm\Ndjson\Parser::decode($ndjson);
Encode ndjson
<?php $array = [ ['foo' => 'bar'], ['hello' => 'world'] ]; $encode = \Soldierm\Ndjson\Parser::encode($array);
Show your support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator