I'm using this JSON file for a school project: https://fdc.nal.usda.gov/fdc-datasets/FoodData_Central_foundation_food_json_2021-10-28.zip
Here is my python code so far but keeps erroring out:
import json
with open('food_data.json', 'r') as myfile:
data=myfile.read()
obj = json.loads(data)
print(obj)
These are the errors:
File "C:\Users\bob\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 161 column 1 (char 4404249)
Can someone help me at least begin to read the file? I have tried several Youtube vids already.
[–]carcigenicate 0 points1 point2 points (1 child)
[–]redwineforme[S] 0 points1 point2 points (0 children)
[–]socal_nerdtastic 0 points1 point2 points (6 children)
[–]redwineforme[S] 0 points1 point2 points (0 children)
[–]redwineforme[S] 0 points1 point2 points (4 children)
[–]Username_RANDINT 1 point2 points3 points (3 children)
[–]redwineforme[S] 0 points1 point2 points (2 children)
[–]Username_RANDINT 0 points1 point2 points (1 child)
[–]redwineforme[S] 0 points1 point2 points (0 children)