https://github.com/jsonmapper/eloquentmiddleware
Map nested JSON structures to Eloquent Models
https://github.com/jsonmapper/eloquentmiddleware
hydration json jsonmapper mapper mapping middelware php
Last synced: 9 days ago
JSON representation
Map nested JSON structures to Eloquent Models
- Host: GitHub
- URL: https://github.com/jsonmapper/eloquentmiddleware
- Owner: JsonMapper
- License: mit
- Created: 2020-08-25T19:56:48.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2025-02-19T10:23:31.000Z (about 1 year ago)
- Last Synced: 2026-02-12T19:55:55.984Z (2 months ago)
- Topics: hydration, json, jsonmapper, mapper, mapping, middelware, php
- Language: PHP
- Homepage: https://jsonmapper.net
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
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



[](https://travis-ci.com/JsonMapper/EloquentMiddleware)
[](https://coveralls.io/github/JsonMapper/EloquentMiddleware?branch=master)
# 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 Eloquent Middleware
The installation of JsonMapper Eloquent Middleware can easily be done with [Composer](https://getcomposer.org)
```bash
$ composer require json-mapper/eloquent-middleware
```
The example shown above assumes that `composer` is on your `$PATH`.
# Contributing
Please refer to [CONTRIBUTING.md](https://github.com/JsonMapper/EloquentMiddleware/blob/master/CONTRIBUTING.md) for information on how to contribute to JsonMapper Eloquent Middleware.
## List of Contributors
Thanks to everyone who has contributed to JsonMapper Eloquent Middleware! You can find a detailed list of contributors of JsonMapper on [GitHub](https://github.com/JsonMapper/EloquentMiddleware/graphs/contributors).
# License
The MIT License (MIT). Please see [License File](https://github.com/JsonMapper/EloquentMiddleware/blob/master/LICENSE) for more information.