averor/json-mapper

Mapping from json to given class or array of classes

1.0.0 2018-08-23 10:18 UTC

This package is auto-updated.

Last update: 2024-10-24 05:04:49 UTC


README

pipeline status coverage report MIT License Semver

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