Last active
November 4, 2015 11:05
-
-
Save stuartwakefield/a29dd155c822210f1043 to your computer and use it in GitHub Desktop.
Ruby script pipe YML files through to convert them to JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Simple usage | |
# yml2json < my.yml > my.json | |
require 'yaml' | |
require 'json' | |
puts JSON.pretty_generate(YAML.load(ARGF.read)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment