James Gray
4/2/2007 11:55:00 AM
On Apr 2, 2007, at 6:01 AM, Rama Singh wrote:
> Florian Frank wrote:
>> Rama Singh wrote:
>>> In the above code "olvID" variable get JSON data, i want to check
>>> iam
>>> getting valid JSON or not, for that i used "@j = JSON.parse
>>> (olvID)", but
>>> i get error :
>>>
>>> c:/ruby/lib/ruby/site_ruby/1.8/json.rb:300:in `parse_object':
>>> expected
>>> ',' or '}' in object at '"Val
>>> ue":"",}},"MetaC'! (JSON::ParserError)
>> ^
>> This isn't allowed in a valid JSON text.
>
> I think this time you understood what actually i am looking for :
>
> 1. I get AsJSON data.
> 2. I want to parse JSON data in ruby.
But as Florian said, you JSON data is not valid JSON. That's why the
Ruby parser won't parse it.
James Edward Gray II