Last active
December 15, 2015 13:39
-
-
Save kaosf/5268786 to your computer and use it in GitHub Desktop.
oneliner JSON parser with Ruby
This file contains hidden or 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
# cat a.json # => {"x": "a", "y": 1, "z": true} | |
cat a.json | ruby -rjson -e "puts JSON.parse(STDIN.read)" # => {"x"=>"a", "y"=>1, "z"=>true} | |
# ruby -v #=> ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-linux] | |
# on Ubuntu 12.04 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment