JavaScript Part - Coding
In Javascript, you:
var arr = ["a","b",,,"e"];
var json_string = JSON.stringify(arr);
then you somehow pass json_string(now equal to the string " ["a","b",null,null,"e"]") from JavaScript to Python.
Python Part - Decoding
Then on the Python side, do:
json_string = '["a","b",null,null,"e"]'
try:
import simplejson as json
except (ImportError,):
import json
result = json.loads(json_string)
[u'a', u'b', None, None, u'e'] Python.
. :
:
JSON.stringify() JavaScript, , Chrome, Firefox, Opera, Safari IE 8.0 ( ),json Python ( simplejson , , ), ,
, .