Editing JSON files with the JSON editor
You can use the JSON text editor to easily modify, format, and validate your JSON files.
About this task
- Syntax highlighting
- Range indication
- Source compression and formatting
- Code folding
- Bracket matching
- Syntax validation
- Outline view
Procedure
- In the Enterprise Explorer view, right-click your .json file or other file type that contains JSON code and select .
- You can compress JSON strings so that the strings display
on one line with white space removed between JSON elements. To compress
JSON strings, right-click the editor and select The white space between elements is removed. from the menu or press CTRL
+ Shift + G.
- To format the content so that it is more readable, right-click
the editor and select The content is wrapped and each object
is placed on its own line. from the menu or press
Ctrl + Shift + F.
- You can use the visual indicators that are shown in the vertical ruler to expand or collapse a corresponding region in the editor. For example, you can expand or collapse structural elements of objects and arrays that span more than one line. To format large amounts of content, click an indicator to toggle the expanded or collapsed state of the corresponding region in the editor.
- To collapse all regions, right-click the vertical ruler and select . All regions are hidden in the editor.
- To expand all regions, right-click the vertical ruler and select . All regions are shown in the editor.
- Save your changes.