Is it safe to parse json with YAML.load?

Monday, July 7, 2014

I am using ruby 2.1.0


I have a json file. For example: test.json



{
"item":[
{"apple": 1},
{"banana": 2}
]
}


Is it safe to load this file with YAML.load?



YAML.load(File.read('test.json'))


I am trying to load a file which is in either json or yaml format.







http://ift.tt/1xFhp0T