Created
July 24, 2015 15:02
-
-
Save anonymous/0a2b8c540e528b3dc69e to your computer and use it in GitHub Desktop.
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
Dir.glob('Modified/*.json').each do |item| | |
file = File.open(item, "w+") | |
hash = JSON.parse(file.read) | |
hash['version'] += 1 | |
file.write(JSON.generate(hash)) | |
file.close | |
end | |
# is giving me this error: `initialize': A JSON text must at least contain two octets! (JSON::ParserError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment