0
閱讀MongoDB的JSON文件我有一個蒙戈集合稱爲test.json,我無法讀取python.If我運行下面的代碼它給人錯誤無法從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
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"
}