swoft / data-parser
simple data parser tool library of the php
v1.0.1
2018-04-12 05:54 UTC
Requires
- php: >7.0.0
This package is auto-updated.
Last update: 2024-12-12 02:37:36 UTC
README
Universal data parser/ for PHP
Driver:
- json(by
json_encode
) - php(by
serialize
) - igbinary(by extension
igbinary
) - msgpack(by extension
msgpack
)
Install
- composer command
composer require swoft/data-parser
Usage
$parser = new JsonParser(); // $parser = new PhpParser(); // $parser = new MsgPackParser(); // encode $encoded = $parser->encode($data); // decode $decoded = $parser->encode($encoded);
Unit testing
phpunit
LICENSE
The Component is open-sourced software licensed under the Apache license.