You are missing a comma after the "name" column's object:

{"id":"Name","label":"Name","pattern":"","type":"string"}, <-- missing this 
comma

On Thursday, November 7, 2013 11:43:28 AM UTC-5, Sandeep Ambekar wrote:
>
> asgallant,
>
> I made changes as you mentioned. I still get the same error. Please 
> suggest.
>
>
>    1. Uncaught Error: Invalid JSON string: { "cols": [ 
>    {"id":"Room","label":"Room","pattern":"","type":"string"}, 
>    {"id":"Name","label":"Name","pattern":"","type":"string"} 
>    {"id":"Start","label":"Start","pattern":"","type":"date"}, 
>    {"id":"End","label":"End","pattern":"","type":"date"} ], "rows": [ 
>    {"c":[{"v":"WATCH","f":null},{"v":"TODAYS","f":null},{"v": 
>    "Date(2013,10,10,01,46,0)","f":null},{"v": 
>    "Date(2013,10,10,06,31,0)","f":null}]}, 
>    {"c":[{"v":"WATCH","f":null},{"v":"AVERAGE","f":null},{"v": 
>    "Date(2013,10,10,01,52,0)","f":null},{"v": 
>    "Date(2013,10,10,06,37,0)","f":null}]} ] } 
>    
> dygraph,format+en,default,timeline.I.js:95<https://www.google.com/uds/api/visualization/1.0/d780f2951a73e815f003b2b487c1d0a3/dygraph,format+en,default,timeline.I.js>
>  
>       1. 
> fodygraph,format+en,default,timeline.I.js:95<https://www.google.com/uds/api/visualization/1.0/d780f2951a73e815f003b2b487c1d0a3/dygraph,format+en,default,timeline.I.js>
>       2. 
> modygraph,format+en,default,timeline.I.js:98<https://www.google.com/uds/api/visualization/1.0/d780f2951a73e815f003b2b487c1d0a3/dygraph,format+en,default,timeline.I.js>
>       3. 
> Vdygraph,format+en,default,timeline.I.js:163<https://www.google.com/uds/api/visualization/1.0/d780f2951a73e815f003b2b487c1d0a3/dygraph,format+en,default,timeline.I.js>
>       4. drawChart
>       
>
>
> On Thu, Nov 7, 2013 at 10:05 PM, asgallant 
> <[email protected]<javascript:>
> > wrote:
>
>> Date objects are not valid inside JSON strings.  The Visualization API 
>> uses a custom string format for handling dates; you need to remove the 
>> "new" keyword and wrap the "Date(...)" in quotes:
>>
>> {"v":"Date(2013,10,10,01,46,0)","f":**null}
>>
>> On Thursday, November 7, 2013 11:21:46 AM UTC-5, Sandeep Ambekar wrote:
>>>
>>> Hi..
>>>
>>> I am looking to pull data for timeline from a JSON file. I get below 
>>> error. Please help in fixing this.
>>>
>>> ERROR:
>>>
>>> Uncaught Error: Invalid JSON string:
>>>
>>>
>>> JSON file used.
>>>
>>> {
>>>   "cols": [
>>>         {"id":"Room","label":"Room","**pattern":"","type":"string"},
>>>         {"id":"Name","label":"Name","**pattern":"","type":"string"}
>>> {"id":"Start","label":"Start",**"pattern":"","type":"date"},
>>>         {"id":"End","label":"End","**pattern":"","type":"date"}
>>>       ],
>>>   "rows": [
>>>         {"c":[{"v":"WATCH","f":null},{**"v":"TODAYS","f":null},{"v": 
>>> new Date(2013,10,10,01,46,0),"f":**null},{"v": new 
>>> Date(2013,10,10,06,31,0),"f":**null}]},
>>>         {"c":[{"v":"WATCH","f":null},{**"v":"AVERAGE","f":null},{"v": 
>>> new Date(2013,10,10,01,52,0),"f":**null},{"v": new 
>>> Date(2013,10,10,06,37,0),"f":**null}]}
>>>         
>>>       ]
>>> }
>>>
>>>  -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Google Visualization API" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/google-visualization-api/DhqFqPJQQv0/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> To post to this group, send email to 
>> [email protected]<javascript:>
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to