Skip to content

soldierm/ndjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to ndjson 👋

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