json-mapper / laravel-package
The JsonMapper package for Laravel
Installs: 76 561
Dependents: 3
Suggesters: 1
Security: 0
Stars: 25
Watchers: 2
Forks: 5
Open Issues: 1
Requires
- php: ^7.2 || ^8.0
- illuminate/support: ^5.5|^6|^7|^8|^9|^10 || ^11.0
- json-mapper/json-mapper: ^2.3
Requires (Dev)
- ext-json: *
- guzzlehttp/guzzle: ^6.5 || ^7.0
- orchestra/testbench: ^5.3|^6.0 || ^9.0
- php-coveralls/php-coveralls: ^2.4
- phpstan/phpstan: ^0.12.19 || ^1.0.0
- phpunit/phpunit: ^8.0 || ^9.0 || ^10.5
- squizlabs/php_codesniffer: ^3.5
README
This is a Laravel package for using JsonMapper in you Laravel application.
JsonMapper is a PHP library that allows you to map a JSON response to your PHP objects that are either annotated using doc blocks or use typed properties. For more information see the project website: https://jsonmapper.net
Why use JsonMapper
Continuously mapping your JSON responses to your own objects becomes tedious and is error prone. Not mentioning the tests that needs to be written for said mapping.
JsonMapper has been build with the most common usages in mind. In order to allow for those edge cases which are not supported by default, it can easily be extended as its core has been designed using middleware.
JsonMapper supports the following features
- Case conversion
- Debugging
- DocBlock annotations
- Final callback
- Namespace resolving
- PHP 7.4 Types properties
Installing JsonMapper laravel package
The installation of JsonMapper Laravel package can easily be done with Composer
$ composer require json-mapper/laravel-package
The example shown above assumes that composer
is on your $PATH
.
Contributing
Please refer to CONTRIBUTING.md for information on how to contribute to JsonMapper Laravel package.
List of Contributors
Thanks to everyone who has contributed to JsonMapper Laravel package! You can find a detailed list of contributors of JsonMapper on GitHub.
License
The MIT License (MIT). Please see License File for more information.