I am trying to import a file which was saved using json.dumps
and contains tweet coordinates:
{
"type": "Point",
"coordinates": [
-4.62352292,
55.44787441
]
}
My code is:
>>> import json
>>> data = json.loads('/Users/JoshuaHawley/clean1.txt')
But each time I get the error:
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
我想最终提取所有坐标,并将它们分别保存到不同的文件中,这样它们就可以被映射,但这个看似简单的问题阻止了我这样做.我看过类似错误的答案,但似乎无法将其应用于此.任何帮助都将不胜感激,因为我对python比较陌生.