Last active
August 29, 2015 14:27
-
-
Save DuckOfDoom/da5868fd7f3549e619de to your computer and use it in GitHub Desktop.
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
require 'json' | |
if ARGV.size < 1 | |
puts "Enter file name" | |
exit | |
end | |
json = JSON.parse File.open(ARGV[0], 'r').read | |
beautiful = JSON.pretty_generate json | |
File.open(ARGV[0], 'w').write(beautiful) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment