# ValueError: Invalid JSON: Expecting property name enclosed in double quotes

- **ID:** `python/fastapi-valueerror-json-encode-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Request body contains invalid JSON syntax (e.g., single quotes instead of double quotes).

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Use proper JSON formatting** (95% success)
   ```
   {"name": "John", "age": 30}
   ```
2. **Use json.dumps() to convert Python object** (90% success)
   ```
   import json
json.dumps({'name': 'John'})
   ```

## Dead Ends

- **Assuming JSON allows single quotes** — JSON standard requires double quotes for strings. (90% fail)
- **Using Python dict directly in JSON body** — Python dict representation is not valid JSON. (70% fail)
