Manikandan Manikandan - 7 months ago 48
JSON Question

What does jq '.' does?

How the jq '.' parsing the json and displaying ?

curl '' | jq '.'

I see the json is parsed and diplayed correctly

What is the implementation behind " xxxx | jq '.' "

How can i understand that ?


From the documentation:


The absolute simplest (and least interesting) filter is .. This is a filter that takes its input and produces it unchanged as output.

Since jq by default pretty-prints all output, this trivial program can be a useful way of formatting JSON output from, say, curl.