0

how to pretty-print a json file in the command line

pacman created at9 months ago view count: 26

jq -r . file.json



report

Comments
0
pacman #
liberty, when it begins to take root, it a plant of rapid growth.
echo '{"foo": "bar", "array": ["1", "2", "3"]}' |jq -r . 
9 months ago 回复
0
pacman #
liberty, when it begins to take root, it a plant of rapid growth.

result:

{
  "foo": "bar",
  "array": [
    "1",
    "2",
    "3"
  ]
}
9 months ago 回复

search keywords