# File lib/json-schema/validator.rb, line 484 def parse(s) if defined?(MultiJson) MultiJson.respond_to?(:adapter) ? MultiJson.load(s) : MultiJson.decode(s) else case @@json_backend.to_s when 'json' JSON.parse(s) when 'yajl' json = StringIO.new(s) parser = Yajl::Parser.new parser.parse(json) else raise JSON::Schema::JsonParseError.new("No supported JSON parsers found. The following parsers are suported:\n * yajl-ruby\n * json") end end end