composer require soldierm/ndjson
<?php
$ndjson = <<<NDJSON
{"foo":"bar"}
{"hello":"world"}
NDJSON;
$decode = \Soldierm\Ndjson\Parser::decode($ndjson);
<?php
$array = [
['foo' => 'bar'],
['hello' => 'world']
];
$encode = \Soldierm\Ndjson\Parser::encode($array);
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator