json in python 2.5

Chris Rebert clp2 at rebertia.com
Sat Sep 3 01:50:36 EDT 2011

On Fri, Sep 2, 2011 at 10:36 PM, Vineet Deodhar <d_vineet at yahoo.com> wrote:
>> e.g., I have this list:
>> L = ['spam', 'ham', 'eggs', 12, (13.63)]
>> What is the correct way to convert L to javascript array format?
> Python likewise has a JSON module in the std lib:
> http://docs.python.org/library/json.html
> ========
> I tried with json in std lib.
> But it is included in python 2.6 onwards.
> For my current proj, I need to use python 2.5.
> Hence can't use json from the std lib.
> Any idea on converting list to json in python 2.5?



More information about the Python-list mailing list