Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Json Ld Api Bundle

Json Ld Api Bundle Laravel Package

dunglas/json-ld-api-bundle

A Symfony bundle for building JSON-LD and Hydra REST APIs from your entities. It adds schema.org vocabularies, pagination, filtering, validation, and API documentation, making it easy to expose hypermedia-driven web APIs.

View on GitHub
Deep Wiki
Context7

The server component of API Platform: hypermedia and GraphQL APIs in minutes

Frequently asked questions about Json Ld Api Bundle
What is dunglas/json-ld-api-bundle used for?
It is used to build self-describing hypermedia REST APIs with JSON-LD and Hydra, including schema.org vocabularies, automatic documentation, content negotiation, and Doctrine integration. It originated as the predecessor to API Platform and is Symfony-oriented, so Laravel teams should treat it as a framework-level API layer rather than a small serializer.
Can I use dunglas/json-ld-api-bundle with Laravel?
Only through the API Platform Laravel bridge, not by installing the Symfony bundle directly. The bridge is materially less mature than the Symfony bundle, so validate it with a short read-only resource spike before committing.
How do I install dunglas/json-ld-api-bundle in a Laravel app?
It is Composer-installable, but the Laravel path is not the Symfony bundle. Add the API Platform Laravel bridge and api-platform/core as a coupled Composer unit, then wire the service provider and routes in your app.
Which Laravel and PHP versions are supported?
The assessment requires PHP 8.1+ and a current Laravel major, but the exact bridge constraints must be checked against its Composer metadata and upstream CI. Pin the bridge and core together and document a compatibility matrix.
Is this a small JSON-LD serializer or the full API Platform core?
Despite the name, the artifact maps to the API Platform Core monorepo, not a narrow serializer bundle. It includes many src components, metadata-driven resource generation, and JSON-LD/Hydra, OpenAPI, and GraphQL surfaces, so treat it as a framework-level dependency.
How do I test JSON-LD and Hydra output before committing?
Run a one-to-two week spike that exposes one read-only Eloquent resource through the Laravel bridge. Verify JSON-LD/Hydra output, OpenAPI generation, and route coexistence with existing Laravel routes, then record gaps against native API Resources before a go/no-go decision.
What are the production risks of using this package in Laravel?
The main risks are bridge maturity, monorepo upgrade blast radius, and low ecosystem validation for Laravel, including zero registry dependents in the assessment. Also verify the release metadata anomaly noted in the evaluation before relying on cadence metrics. Budget time for serialization, pagination, error handling, and observability conventions.
What alternatives should I consider for JSON-LD and Hydra APIs in Laravel?
For plain REST, native Laravel API Resources plus OpenAPI tooling may be sufficient and lower risk. If you need JSON-LD/Hydra specifically, compare API Platform's Laravel bridge against dedicated hypermedia packages and a Symfony-based API Platform service. For GraphQL-from-models, evaluate Lighthouse or another Laravel-native GraphQL stack before adopting API Platform.
How is the package maintained and what is the upgrade path?
Contributor guidance is Symfony-first, with a Symfony fixture app and Symfony-flavored PHPUnit, so Laravel edge cases are less exercised upstream. Upstream fixes require composer link, filtered PHPUnit runs, PHPStan warm-up, and fixture isolation. Pin bridge and core together, verify the future-dated release signal, and keep a fallback to native Laravel resources.
Does it support GraphQL, OpenAPI, pagination, filtering, and validation?
Yes, the architecture derives JSON-LD/Hydra, OpenAPI, and GraphQL from the same resource metadata, with pagination, filtering, validation, and documentation features. In Laravel, expect to own more configuration and serialization tuning than in the Symfony bundle.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections