Function to parse json and pretty-print it.