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 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