This module improves Drupal's JSON response capabilities by simplifying debugging and enhancing JSON:API support. It allows disabling the JSON response cache directly from the admin interface and enables displaying any entity in JSON:API format with the option to include related data.
CacheableJsonResponse is a powerful tool that can easily enhance the performance of your headless site.
However, it has two main drawbacks:
- Debugging challenges: If you encounter an issue, you need to replace CacheableJsonResponse with JsonResponse or clear the cache after every change, which can be cumbersome.
- JSON:API format limitation: It doesn’t support displaying entities in the JSON:API format.
This module solves both problems:
- Simplified debugging: By using the BetterJsonResponse class instead of CacheableJsonResponse, you can disable the JSON response cache directly from the back office with a single checkbox.
- Enhanced JSON:API support: You can now display any entity in JSON:API format, with the ability to add includes as needed.
Ask your assistant about Better Json Response
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- jsonapi Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.