Format/Prettify Json

I have a file that contains generated JSON, e.g. a JavaScript source-map. The file does not contain any line breaks.

How do I quickly reformat this file in Webstorm to make it humanly readable, adding line-breaks in a reasonable way.
My JavaScript code-style settings don't touch (force) line breaks, and I don't want to change that.

Any ideas?


Comment actions Permalink

Create 2 different code styles and switch between them?

Ctrl+` (or whatever shortcut you may have there for "View | Quick Switch Scheme...")

Comment actions Permalink

Thx, will try that! Used nodejs with jsonlint on the cli in the meantime but thought that should really be something I can do in the IDE.


Please sign in to leave a comment.