Convert Python None to JavaScript null
If you're using Python 2.6 or later, you can use the built-in json module:
>>> import json
>>> json.dumps([1, 2, 3, None, 4])
'[1, 2, 3, null, 4]'
See http://docs.python.org/library/json.html
If you're using Python 2.6 or later, you can use the built-in json module:
>>> import json
>>> json.dumps([1, 2, 3, None, 4])
'[1, 2, 3, null, 4]'
See http://docs.python.org/library/json.html