qlimix / encoding-json
Encoding & decoding array's to string and vice versa
2.0.0
2020-04-12 10:23 UTC
Requires
- php: >=7.4
- ext-json: *
- qlimix/encoding: ^2.0
Requires (Dev)
- qlimix/code-standard: ^2.0
This package is auto-updated.
Last update: 2024-11-12 20:34:36 UTC
README
Encode and decode json based on the qlimix/encoding package.
Install
Using Composer:
$ composer require qlimix/encoding-json
usage
<?php use Qlimix/Encoding/Encode/JsonEncode; use Qlimix/Encoding/Decode/JsonDecode; $encode = new JsonEncode(); $decode = new JsonDecode(); $value = ['foo' => 'bar', 'number' => 1]; $encoded = $encode->encode($value); $decode = $decode->decode($encoded);
Testing
To run all unit tests locally with PHPUnit:
$ vendor/bin/phpunit
Quality
To ensure code quality run grumphp which will run all tools:
$ vendor/bin/grumphp run
Contributing
Please see CONTRIBUTING for details.