https://github.com/swoft-cloud/swoft-data-parser
Data parser of swoft 1.0(Now 2.0, please use swoft/swoft-serialize)
https://github.com/swoft-cloud/swoft-data-parser
php swoft
Last synced: 8 months ago
JSON representation
Data parser of swoft 1.0(Now 2.0, please use swoft/swoft-serialize)
- Host: GitHub
- URL: https://github.com/swoft-cloud/swoft-data-parser
- Owner: swoft-cloud
- License: apache-2.0
- Created: 2019-06-28T03:44:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-11T15:20:18.000Z (about 6 years ago)
- Last Synced: 2025-04-20T17:03:20.726Z (8 months ago)
- Topics: php, swoft
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
composer require swoft/data-parser
```
## Usage
```php
$parser = new JsonParser();
// $parser = new PhpParser();
// $parser = new MsgPackParser();
// encode
$encoded = $parser->encode($data);
// decode
$decoded = $parser->encode($encoded);
```
## Unit testing
```bash
phpunit
```
## LICENSE
The Component is open-sourced software licensed under the [Apache license](LICENSE).