soldierm / ndjson
php parse ndjson
1.0
2020-01-16 09:05 UTC
Requires
- php: ^7.1
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2026-03-16 23:17:10 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