Registry / serialization / json-mapper-json-mapper

json-mapper-json-mapper

JSON →
library2.25.1phppackagistunverified

Map JSON structures to PHP classes.

composer require json-mapper/json-mapper
INSTALL
IMPORT
SIG · JSON-MAPPER-JSON-M
J
json-mapper-json-mapper
serializationphpv2.25.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JsonMapper
use JsonMapper\JsonMapper;

Map a JSON object to a PHP class instance.

<?php use JsonMapper\JsonMapper; $mapper = new JsonMapper(); $object = $mapper->map(json_decode('{"name":"John"}'), new User());
Debug
Known issues
gotchaRequires PHP 7.4+ and may have issues with nested objects without proper type hints.
fix
Ensure all properties have type declarations for proper mapping.
affects: >=2.0.0
Upgrade
Version history
2.25.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
json-mapper-json-mapper — pip install json-mapper-json-mapper · libregistry