I am having JSON syntax issues when I am using the following code code: https://github.com/clarkbk/streeteasy-analysis
Using this JSON in buildings.json
{
"buildings": [
{
"name": "Henry Hall",
"addr": "https://streeteasy.com/nyc/property_activity/past_transactions_component/799324?all_activity=true&show_rentals=true&style=xls",
"id": 799324,
}
]
}
I am getting the following error:
2019-05-25 16:04:26,641 - INFO - Starting...
Traceback (most recent call last):
File "run.py", line 27, in <module>
data = json.load(f)
File "/usr/lib/python3.6/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 9 column 5 (char 220)
root@LAPTOP-4QGC19OR:/home/HN/streeteasy-analysis#
I have researched for a few hours now on how to fix this but can't come up with a fix. I am not that familiar with JSON in general but I don't know where I am not double qouting properly. Appreciate any help with this.
"id": 799324 }json isn't python, if there's a comma on last element it fails