buchin / jltools
Helper for interacting with JSON Lines
dev-master
2016-11-09 11:05 UTC
Requires
- symfony/console: ^3.1
Requires (Dev)
- kahlan/kahlan: ^3.0
This package is auto-updated.
Last update: 2024-11-15 19:29:32 UTC
README
Helper for interacting with JSON Lines
Installation
composer require buchin/jltools
Example
Here is some example. Currently only do one thing: add new field.
Add new field
This script will add key and value pair to every line in json file
<?php use Buchin\Jltools\Jltools; $jltools = new Jltools; $jltools->setPath('/Path/to/jsonline.jsonl'); $jltools->addField('key', 'value', 'output.jsonl');
Pull Request
If you want to add new feature to this package, please send a pull request. All pull request should come with it’s own test. I currently use kahlan for my testing purpose.