Yo, had the same issue last week! The problem might not be json.loads() but the JSON itself. Some APIs return weird formats.
Try this:
```python
import json
data = json.loads(json_string.strip()) # strip() removes whitespace
print(type(data)) # should be <class 'dict'>
```
If it's still failing, post a sample of your JSON here. Maybe we can spot the issue.
Try this:
```python
import json
data = json.loads(json_string.strip()) # strip() removes whitespace
print(type(data)) # should be <class 'dict'>
```
If it's still failing, post a sample of your JSON here. Maybe we can spot the issue.
