Created
November 18, 2015 00:57
-
-
Save burtlo/0726166e41481c286ede to your computer and use it in GitHub Desktop.
Find all the JSON files in the local directory and any subdirectories and attempt to parse them with a Ruby JSON parser. If any of them fail to load an error message will be displayed.
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
require 'json' | |
Dir["**/*.json"].each do |json_file| | |
JSON.parse(File.read(json_file)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment