Skip to content

php-toolkit/data-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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