Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPStorm 7.3.1 JSON formatter tool

Tags:

I use PHPstorm IDE and would like to find a plugin to format JSON so that it is easier for me to read.

Currently I have this in a file displayed in the IDE:

{"property":"value1","property2":"value2","array1":[{"attr1":"value1"},{"attr2":"value2"}]}

I would like a plugin I can run so that I can look at this instead:

{
   "property": "value1",
   "property2": "value2",
   "array1": [
      {
         "attr1": "value1"
      },{
         "attr2": "value2"
      }
   ]
}

I found the following plugin, but it does not seem to work with PHPStorm : http://plugins.jetbrains.com/plugin/3964?pr=

like image 354
David Laberge Avatar asked Apr 03 '14 18:04

David Laberge


1 Answers

It is possibly because I'm new to PHPStorm, but the option in the menu Code -> Reformat Code (CTRL + ALT + L) does the job fine in a .json file, and goes an ok job in a .js file.

like image 187
David Laberge Avatar answered Sep 19 '22 17:09

David Laberge