[FEATURE] A "Pretty Print" check box for JSON Field.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem
Currently, when publishing a contentlet that contains JSON within a JSON Field, it removes all return characters and tab characters, bringing it to a single raw line making it difficult to edit or read the JSON.
https://github.com/user-attachments/assets/42ad63ba-797d-408c-a193-42875adeda5c
Goal
Having an option to enable pretty print would make these JSON Fields a lot easier to edit when going back into a contentlet, as well as easier to read.
Target Personas
- Developer teams
- Content teams
- DevOps teams
- System administrators (dotCMS)
Demo Expectations
In the demo, we will show the Pretty Print check box for the JSON Field type and how it re-organizes the text.
Acceptance Criteria
When the “Pretty Print” checkbox is enabled, valid JSON entered into the field is automatically formatted with line breaks and indentation.
User Stories
No response
Links
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the JSON Field editor and its existing publish or formatting behavior, then trace how field options are stored. Done means the editor exposes a Pretty Print checkbox and valid JSON is shown with line breaks and indentation when it is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- content
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100