Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 560 Bytes

README.md

File metadata and controls

43 lines (29 loc) · 560 Bytes

data parser utils

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