user697911
user697911

Reputation: 10531

How to display JSON's structure in IntelliJ?

For example, for a simple file like this, it displays everything in one line:

{"315": "appear", "1529": "perVobj", "88": "JJR", "2212": "xM"}

I would like it to be displayed at multiple lines, like:

{
  key:value,
  key: value,
  ...
} 

Upvotes: 1

Views: 7081

Answers (2)

Doc
Doc

Reputation: 11651

go to File->Settings->Code Style->JSON and set as per your needs. enter image description here


Further, go to settings and create shortcut for reformat or use Ctrl+Shift+Alt+L(default) to reformat the file. see thisenter image description here

Upvotes: 1

Green
Green

Reputation: 2565

Try to use:

Ctrl+Shift+Alt+L

it would reformat your file

Upvotes: 2

Related Questions