Skip to content

Instantly share code, notes, and snippets.

@mochizuki-masao
Created September 20, 2016 04:50
Show Gist options
  • Save mochizuki-masao/d587f53eb107eaf663c57bd619ec4d2f to your computer and use it in GitHub Desktop.
Save mochizuki-masao/d587f53eb107eaf663c57bd619ec4d2f to your computer and use it in GitHub Desktop.
Convert ALL JSON Files to YAML syntax. (Especially work well with CloudFormation update...)
$ ruby -rjson -ryaml -e 'Dir.glob("*.json").map{ |f| File.write(f, YAML.dump(JSON.parse(File.read(f)))) }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment