Pretty printing JSON in Vim

         

 

There are two simple steps to turn a big unreadable mess of json into a simple to read and edit json file.  First, vim your file.  Second, use the json.tool to prettify it.

  1. vim <your file>
  2. :%!python -m json.tool

That’s it.  You’re welcome!

Leave a Reply