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

{"apple": 1},
{"banana": 2}

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


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