Download the PHP package hamlet-framework/json-mapper without Composer
On this page you can find all versions of the php package hamlet-framework/json-mapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download hamlet-framework/json-mapper
More information about hamlet-framework/json-mapper
Files in hamlet-framework/json-mapper
Download hamlet-framework/json-mapper
More information about hamlet-framework/json-mapper
Files in hamlet-framework/json-mapper
Please rate this library. Is it a good library?
Informations about the package json-mapper
Hamlet Framework / Json Mapper
Quick Summary:
- Psalm type specifications including object-like-arrays, union types, associative arrays etc.
- PHP-Parser for resolving FQCN
- Uses reflection by default
- Reusable code-as-configuration
- Supports polymorphism through subtype resolvers
- Cascading configuration options for subtree resolutions
- Type safety: Psalm will know that
JsonMapper::map(_list(_class(User::class)), ...)
returnslist<User>
. - Cast exception thrown for impossible casting
As a start, to map the following JSON structure:
into the following class hierarchy:
use:
The library uses hamlet-framework/type library for type specifications.
Configuration Options
The third parameter of the JsonMapper::map
is JsonMapperConfiguration
used to customize the mapping process.
Json Property
Using Setters
Using Converter
Using Type Dispatcher
Using JsonMapperAware interface
If you want to keep your mapping configuration closer to the files you map, there's an option to implement JsonMapperAware
interface
To do
- Add support for
ignoreUnknown
- Add support for constructor methods
- Add validators
- Add examples with psalm specs
All versions of json-mapper with dependencies
PHP Build Version
Package Version
The package hamlet-framework/json-mapper contains the following files
Loading the files please wait ....