I found that for list and dict

repr(L)

works as good as

gluon.contrib.simplejson.dumps(L)

and it is much faster. What am I missing?

On Dec 29, 10:26 am, DenesL <denes1...@yahoo.ca> wrote:
> def jsonlist():
>   import gluon.contrib.simplejson
>   L = [ { 'label': "Foo", 'data': [ [10, 1], [17, -14], [30, 5] ] },
>     { 'label': "Bar", 'data': [ [11, 13], [19, 11], [30, -7] ] } ]
>   response.headers['Content-Type']='text/json'
>   return gluon.contrib.simplejson.dumps(L)
>
> On Dec 29, 9:38 am, bova <povetki...@gmail.com> wrote:
>
> > Hello!
>
> > I'm using web2py with jquery and jquery.flot plugin
>
> > Tell me please how can I get json output like following:
> >   [ { label: "Foo", data: [ [10, 1], [17, -14], [30, 5] ] },
> >     { label: "Bar", data: [ [11, 13], [19, 11], [30, -7] ] } ]
>
>

Reply via email to