[updated]
Service was actually designed for stream rather than data in bulk. So that is why I was actually getting array of objects instead of array of array objects.
I handled it at javascript side finally using the following logic.
1. data = data.replace(']','],')
2. data = '[' + data.rstrip(',') + ']'
3. data = json.loads(data)
Reply to the above answer
Actually it is not, the json will be
{"key":[[...],[...]]}
I have tried the code and it fails with the following error.
...
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 326, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 369, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 2 column 1 - line 38 column 119 (char 25 - 4048)