averor / json-mapper
Mapping from json to given class or array of classes
1.0.0
2018-08-23 10:18 UTC
Requires
- php: >=7.1
- beberlei/assert: ^2.9
Requires (Dev)
- phpunit/phpunit: ^6
This package is auto-updated.
Last update: 2024-10-24 05:04:49 UTC
README
Mapping from json to given class or array of classes
Install using Composer:
composer require averor/json-mapper
Usage:
Single object
object \Averor\JsonMapper\JsonMapper::map(string $json, string $fqcn);
Array of objects
array \Averor\JsonMapper\JsonMapper::mapArray(string $json, string $fqcn);
Testing with PHPUnit (>=6.0)
$ ./vendor/bin/phpunit ./tests