Skip to content

Instantly share code, notes, and snippets.

@niqdev
Last active June 23, 2021 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niqdev/bb0544f6c0879c4dc63dbd7eb439ae17 to your computer and use it in GitHub Desktop.
Save niqdev/bb0544f6c0879c4dc63dbd7eb439ae17 to your computer and use it in GitHub Desktop.
jq stringify JSON
#cat example.json
#{
# "myKey": "myValue",
# "myArray": [
# "hello",
# "world"
# ]
#}
cat example.json | jq -c | jq -R
jq tostring example.json
#"{\"myKey\":\"myValue\",\"myArray\":[\"hello\",\"world\"]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment