" [I have a json object holding the following value value "val":"test","val1":"test1","val2":"test2"I want to loop through it in ruby to get the key valu. RelatedJson string parsing to java object with multiple objects. Ruby Json Parse Error and other critical errors can occur when your Windows operating systemOur laser focus on a single technology has made us a leader in this space.in parse from deep3.rb:84 Report post Edit Move Delete topic Reply with quote Re: Json Parse error in Ruby: parse: 795 Parse the JSON document source into a Ruby data structure and return it. opts can have the following keysallownan: If set to true, allow NaN, Infinity and -Infinity in defiance of RFC 4627 to be parsed by the Parser. Parsing JSON using Ruby. The following example shows that the first 2 keys hold string values and the last 3 keys hold arrays of strings. Lets keep the following content in a file called input. json. In Rails 3, the JSON gem that runs C or pure Ruby code is default. As per the accepted answer, the gem parses JSON documents rather than elements. A document is either a collection in the form of key, value (object/hash) or values (array). require json h JSON.parse string. In the above code example this would return a ruby hash that mimics the JSON structure.Block Quote. So where ever you have used quotes in your value please omit them using backslash.