tserres / simple_json_view_serializer
There is no license information available for the latest version (1.0.2) of this package.
Add a simple JSON serializer for Drupal 10 views
1.0.2
2023-10-16 06:30 UTC
Requires
- php: >=8.1
- drupal/core: ^10.0
This package is not auto-updated.
Last update: 2024-09-30 23:28:19 UTC
README
Description
simple_json_serializer
is a style plugin for Drupal Views that serializes view results into a simplified JSON format. This serializer is tailored specifically to handle Paragraph and Taxonomy entities, offering custom output for each type.
Features
- Paragraph Serialization: For each paragraph field in the view, the serializer provides all inner fields of the paragraph instead of just returning the paragraph's ID.
- Taxonomy Serialization: For taxonomy fields, the serializer returns only the taxonomy term's label.
Installation
Require the module using Composer:
composer require tserres/simple_json_view_serializer
Enable the module:
- Via the Drupal admin interface
- Or using Drush:
drush en simple_json_view_serializer
Usage
- Create or edit a view.
- Add or modify a "REST export" display.
- In the format section, choose "Simple JSON Serializer".
- Configure your view as required.
- When accessing the display's REST URL, results will be serialized in the simplified JSON format defined by this plugin.
License
This module is shared under the GPLv2 license, consistent with Drupal.
Support and Contributions
For issues or suggestions, open a ticket in our issue tracking system. Pull request contributions are also appreciated.
Author
Thomas SERRES