<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt">> e.g., I have this list:<br>> L = ['spam', 'ham', 'eggs', 12, (13.63)]<br>> What is the correct way to convert L to javascript array format?<br>> 1) jsonify the list and pass it to javascript<br>> (whether json format & javascript array are similar?)<br><br>JSON is in fact a subset of JavaScript, and modern browsers now<br>include a specific API for parsing and generating it<br>(https://developer.mozilla.org/En/Using_native_JSON ).<br>=============<br>@Chris, thanks for the pointer on parsing json.<br>=============<br>Python likewise has a JSON module in the std lib:<br>http://docs.python.org/library/json.html<br>========<br>I tried with json in std lib.<br>But it is included in python 2.6 onwards.<br>For my current proj, I need to use python 2.5.<br>Hence can't use json from the std lib.<br>Any idea on converting list
 to json in python 2.5?<br>=========<br><br>Thanks,<br>Vineet<br></div></body></html>