uni-method/jsonapi-mapper
A Laravel package for mapping Eloquent models to JSON:API resources. Define resource classes covering attributes, relationships and links, then transform models into spec-compliant JSON:API documents with consistent, predictable serialization.
type/id envelopes), this could reduce hand-rolled serializer code — if it actually implements the spec. Verify before committing.Adopt only if all of the following hold:
composer.json match your stack, and you can verify it installs cleanly today.Look elsewhere when:
spatie/laravel-data (DTOs + validation + Laravel-native), symfony/serializer (framework-agnostic, huge adoption), jms/serializer (annotations/attributes, mature), or league/fractal (transformers for API output).cloudcreativity/laravel-json-api is the Laravel-standard choice) rather than a general JSON mapper with "jsonapi" in the name.Bottom line: treat this as a read-for-ideas or fork-and-own candidate, not a dependency you add and forget.
To executives: This is a small, unproven open-source utility that could save a few days of engineering on JSON↔object mapping for an internal integration. It carries no license cost, but it also carries no vendor support and essentially no external adoption — so we would own it the moment we use it. Recommendation: not a strategic dependency; consider it only inside a low-blast-radius feature, with our own tests around it, or skip it and use a widely adopted alternative at roughly the same effort.
To engineering: The pitch is narrow — it's a JSON mapper for Laravel, likely with JSON:API-flavored conventions. With 3 stars and 0 dependents, assume the upstream could go quiet tomorrow. If we adopt: pin the version, wrap it behind our own mapper interface so it's swappable, and cover round-trip serialization with tests. If the actual requirement is JSON:API compliance, we should evaluate cloudcreativity/laravel-json-api instead; if it's DTO hydration, spatie/laravel-data is the lower-risk default.
Decision requested: Approve a short (≤1 day) spike to read the source and confirm whether it (a) genuinely implements JSON:API semantics and (b) is small enough to fork — otherwise default to a mainstream library and close this out.
How can I help you explore Laravel packages today?