Skip to content

Instantly share code, notes, and snippets.

@SammyLin
Created July 17, 2015 03:49
Show Gist options
  • Select an option

  • Save SammyLin/94509bf759d3873e6897 to your computer and use it in GitHub Desktop.

Select an option

Save SammyLin/94509bf759d3873e6897 to your computer and use it in GitHub Desktop.
一行 YAML 轉 JSON
ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' < file.yml > file.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment