In trying to get web2py to talk to Google charts, I need to be able to 
create a "DataTable" for Google charts that looks like this (taken from 
their doc):

{
  cols: [{id: 'A', label: 'NEW A', type: 'string'},
         {id: 'B', label: 'B-label', type: 'number'},
         {id: 'C', label: 'C-label', type: 'date'}
        ],
  rows: [{c:[{v: 'a'}, {v: 1.0, f: 'One'}, {v: new Date(2008, 1, 28, 0, 31, 
26), f: '2/28/08 12:31 AM'}]},
         {c:[{v: 'b'}, {v: 2.0, f: 'Two'}, {v: new Date(2008, 2, 30, 0, 31, 
26), f: '3/30/08 12:31 AM'}]},
         {c:[{v: 'c'}, {v: 3.0, f: 'Three'}, {v: new Date(2008, 3, 30, 0, 31
, 26), f: '4/30/08 12:31 AM'}]}
        ]
}

Problem is, when I create this and then send my view an 
XML(response.json(datatable)) I get everything inside of quotes. In 
particular, I need to get the "c" and "v" values and the "new Date(...)" 
out of quotes, while leaving legitimate strings in quotes. Does anyone know 
a straightforward way to do this?

Reply via email to