toolkit / data-parser
some data parser tool library of the php
v1.0.2
2018-04-30 07:02 UTC
Requires
- php: >7.0.0
Suggests
- inhere/console: a lightweight php console application library.
- inhere/php-validate: Very lightweight data validate tool
- inhere/simple-print-tool: Very lightweight data printing tools
This package is auto-updated.
Last update: 2024-11-25 07:58:54 UTC
README
simple data parser for php
driver
- json(by
json_encode
) - php(by
serialize
) - swoole(by extension
swoole_serialize
) - msgpack(by extension
msgpack
)
Install
- composer command
composer require toolkit/data-parser
Usage
$parser = new SwooleParser(); // $parser = new JsonParser(); // $parser = new PhpParser(); // $parser = new MsgPackParser(); // encode $encoded = $parser->encode($data); // decode $decoded = $parser->encode($encoded);
Unit testing
phpunit
License
MIT