toolkit/data-parser

some data parser tool library of the php

v1.0.2 2018-04-30 07:02 UTC

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