Skip to content

Instantly share code, notes, and snippets.

@builtroller
Last active November 11, 2021 22:43
Show Gist options
  • Save builtroller/95b5e87d2890b26a066eeb9a17f4a161 to your computer and use it in GitHub Desktop.
Save builtroller/95b5e87d2890b26a066eeb9a17f4a161 to your computer and use it in GitHub Desktop.
convert json response to yaml

Setup

Format JSON

Format JSON in VSCode (example.json)

  • select one single quote
  • <CMD>+<SHIFT>+L
  • type double quote
  • <RT-CLICK> => Format Document

Install yq

brew install yq

Command

cat example.json | yq e -P -

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment