Overview

I had the opportunity to use the “JSON Field” module for handling JSON format fields in Drupal, so this is a personal note for future reference.

https://www.drupal.org/project/json_field

As a result, JSON can now be handled together with an editor as shown below.

Installation

Download it with the following commands.

cdormupsohseernrjesqouni_rfeie'lddrupal/json_field:^1.4'

Furthermore, enable the widget as well with the following.

drushenjson_field_widget

If enabling from the GUI, enable the following two modules.

Configuration

Add a JSON field in the field management of the content type.

Then, select the widget in “Manage form display”.

As a result, the following form is displayed on the content editing screen.

Summary

I hope this serves as a useful reference for managing JSON in Drupal.