# json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

- **ID:** `python/fastapi-json-encoding-error-response`
- **Domain:** python
- **Category:** encoding_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

客户端发送的请求体不是有效的 JSON 格式，或 Content-Type 头未设置为 application/json。

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   import requests
response = requests.post('http://localhost:8000/endpoint', json={'key': 'value'})
   ```

## Dead Ends

- **** — BOM 会导致 JSON 解析失败，因为 JSON 标准不允许 BOM (80% fail)
- **** — FastAPI 已经自动解析，手动解析会重复处理导致错误 (70% fail)
