simple data parser for php
driver
- json(by
json_encode
) - php(by
serialize
) - swoole(by extension
swoole_serialize
) - msgpack(by extension
msgpack
)
- composer command
composer require toolkit/data-parser
$parser = new SwooleParser();
// $parser = new JsonParser();
// $parser = new PhpParser();
// $parser = new MsgPackParser();
// encode
$encoded = $parser->encode($data);
// decode
$decoded = $parser->encode($encoded);
phpunit
MIT