I am trying to read a json file generated through json.dump module in python and reading it in a javascript using JSON.parse. However, for some of the json dumps the javascript is throwing an exception for invalid literal. Does anyone know why this might happen or what should I do to prevent this?
Browsers: Chrome/Firefox; python ver: 2.7
EDIT1: based on the comment supplying some code
1) json dumped using
import json
json.dump(<python-dict>, open(<filename>,'w'), encoding='utf-8')``
2) Code read using
d3.jsonOutput: a syntax error is thrown before the callback is called.JSON.parseOutputs: invalid json
EDIT2: it may be relevant , the json dump is pretty large , around 24M uncompressed.