Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 600 Bytes

README.md

File metadata and controls

43 lines (28 loc) · 600 Bytes

Data parser

Universal data parser/ for PHP

Driver:

  • json(by json_encode)
  • php(by serialize)
  • igbinary(by extension igbinary)
  • msgpack(by extension msgpack)

Install

  • composer command
composer require swoft/data-parser

Usage

$parser = new JsonParser();
// $parser = new PhpParser();
// $parser = new MsgPackParser();

// encode
$encoded = $parser->encode($data);

// decode
$decoded = $parser->encode($encoded);

Unit testing

phpunit 

LICENSE

The Component is open-sourced software licensed under the Apache license.