I have a JSON dataset like the following:
{"reviewerID": "A23I5I4K77N533", "asin": "1412719410", "reviewerName": "J. Morton \"Aussie mama\"", "helpful": [4, 4], "reviewText": "This has to be one of the most frustrating toys. Ours is the version with Winnie the Pooh books, but the hardware is the same. In theory it is a good idea, but it does not even come close to living up to that. Ninety percent of the time it will not recognize that there is a book inserted and will keep repeating, \"Please insert a book.\" When it does start to read you only have to jiggle the book ever so slightly for it to ask for a book again.The \"cover\" of the system comes apart from the base very easily.I would not recommend this toy at all.", "overall": 1.0, "summary": "Worst Toy Ever.", "unixReviewTime": 1343606400, "reviewTime": "07 30, 2012"} {"reviewerID": "A18PMN2VYJ73Z6", "asin": "1412719410", "reviewerName": "lalisaww", "helpful": [0, 0], "reviewText": "It does nothing but saying \"bye bye\" after a long silence.Quite odd, isn't it?I returned it to amazon after trying for a few times.Awful toy.", "overall": 1.0, "summary": "It doesn't work at all", "unixReviewTime": 1379030400, "reviewTime": "09 13, 2013"}
Its 2.5 million+ data, size 1.7gb+. So, editing or manipulating the data manually is very difficult. I tried loading it in VS code which gives me this error:
JSONDecodeError: Unterminated string starting at: line 1 column 116
My code for loading the data was:
1.
reviews= []
for line in open('ReviewSample.json', 'r'):
reviews.append(json.loads(line))
2.
data = [json.loads(line) for line in open('ReviewSample.json', 'r')]
both worked fine in Jupyter(Anaconda) but gives error in VS Code(in Jupyter servers as well),
Any effective solution to make it work in VS Code?
TIA.