swoft/data-parser

simple data parser tool library of the php

v1.0.1 2018-04-12 05:54 UTC

This package is auto-updated.

Last update: 2021-11-11 20:04:43 UTC


README

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.