composer require emtiazzahid/ndjson
<?php
$decode = \EmtiazZahid\Ndjson\Parser::decode($your_file_path);
<?php
$array = [
['foo' => 'bar'],
['hello' => 'world']
];
$encode = \EmtiazZahid\Ndjson\Parser::encode($array);
.\vendor\bin\phpunit test/ParserTest
Give a ⭐️ if this project helped you!