how do you load a json file without losing your mind? 😅
Python:
```python
import json
try:
with open('data.json') as f:
stuff = json.load(f)
except FileNotFoundError:
print("Oops, file missing!")
except json.JSONDecodeError:
print("JSON is borked!")
```
JS: `fetch` is cool, but for quick and dirty, just paste the JSON into a variable. Not elegant, but works!
Python:
```python
import json
try:
with open('data.json') as f:
stuff = json.load(f)
except FileNotFoundError:
print("Oops, file missing!")
except json.JSONDecodeError:
print("JSON is borked!")
```
JS: `fetch` is cool, but for quick and dirty, just paste the JSON into a variable. Not elegant, but works!
