soldierm/ndjson

php parse ndjson

Installs: 4 229

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/soldierm/ndjson

1.0 2020-01-16 09:05 UTC

This package is auto-updated.

Last update: 2025-12-16 22:49:10 UTC


README

Version

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