Skip to content

Instantly share code, notes, and snippets.

@davetron5000
Created May 4, 2023 23:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davetron5000/7f459ef5732c42b4923b9a4e4607361f to your computer and use it in GitHub Desktop.
Save davetron5000/7f459ef5732c42b4923b9a4e4607361f to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "json"
DATA.each do |file|
json = JSON.parse(File.read(file))
File.open(file,"w") do |out|
out.puts JSON.pretty_generate(json)
end
end
__END__
tmp/blah.json
tmp/foo.json
test/test.json
test/test2.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment