穿幫哀悼蟒蛇加載JSON文件,使用導致錯誤
當我試圖JSON文件加載到MongoDB中,我收到以下錯誤:
raise ValueError("No JSON object could be decoded").
在我看來,我的問題來自我的第二個領域,但我不知道如何將名稱更改爲名稱,或者在刪除之前加載它。
我的JSON文件是:
{
"_id" : "585a9ecec62747d1e19497a5",
"" : NumberInt(0),
"VendorID" : NumberInt(2),
"lpep_pickup_datetime" : "2015-11-01 00:57:34",
"Lpep_dropoff_datetime" : "2015-11-01 23:57:45",
"Store_and_fwd_flag" : "N",
"RateCodeID" : NumberInt(5),
"Pickup_longitude" : -73.9550857544,
"Pickup_latitude" : 40.6637229919,
"Dropoff_longitude" : -73.958984375,
"Dropoff_latitude" : 40.6634483337,
"Passenger_count" : NumberInt(1),
"Trip_distance" : 0.09,
"Fare_amount" : 15.0,
"Extra" : 0.0,
"MTA_tax" : 0.0,
"Tip_amount" : 0.0,
"Tolls_amount" : 0.0,
"Ehail_fee" : "",
"improvement_surcharge" : 0.0,
"Total_amount" : 15.0,
"Payment_type" : NumberInt(2),
"Trip_type" : NumberInt(2),
"x" : -8232642.48775,
"y" : 4962866.701,
"valid_longitude" : NumberInt(1),
"valid_latitude" : NumberInt(1),
"valid_coordinates" : NumberInt(2)
}
當你使用Python時,請用它來標記你的問題。 – trincot
請單擊[編輯](http://stackoverflow.com/posts/43866216/edit)鏈接並更新您的問題,以顯示試圖讀取此數據的代碼。 –