У меня есть коллекция Монго под названием test.json, я не могу читать test.json из python.If я запустить код ниже его дает ошибкуНевозможно прочитать MongoDB JSON файл из Python
ValueError: No JSON object could be decoded
from bson import ObjectId
import json
from pprint import pprint
with open('E:/Work/Paths/Production/test.json') as data_file:
data = json.load(data_file)
pprint(data)
test.json
{
"_id" : ObjectId("582c2011fe5dc80c8f2f8077"),
"menuNumber" : NumberInt(14603),
"imageurl" : "menu/test.png",
"imageurl_thumb" : "master/14603_thumb.png"
}
{
"_id" : ObjectId("582c2018fe5dc80c8f2f8078"),
"menuNumber" : NumberInt(14614),
"imageurl" : "menu/test1.png",
"imageurl_thumb" : "master/14614_thumb.png"
}