Skip to content

Instantly share code, notes, and snippets.

@davetron5000
Created May 4, 2023 23:21
#!/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