Tools

Tools: jq

jq is a tool for processing JSON data. Use it to format, slice, filter, and transform JSON structured data. Think of it as a combination of sed, awk, and grep that is focused on processing JSON formatted data.

Resources

jq home page: The jq home page is likely the only resource that you will need.

Mac install: $brew install jq.

Usage

Neat interaction with Vim

Using the shebang functionality of Vim, you can use jq to format JSON inline whilst you are editing. This is damn cool and very useful.

Use V to do a block visual selection of the JSON that you wish to format. Then enter shebang (!) and you will be at the command line ready to enter a shell command. Then enter jq and press enter. Your JSON will be magically formatted inline in your open Vim file.

:'<,'>!jq

Of course, jq is incredibly flexible and the more you learn the jq command the more you will be able leverage this inside of Vim.

Tools

Web

Languages

Data