# BadRequest: 400 Bad Request: Failed to decode JSON object

- **ID:** `python/flask-json-request-parse-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

请求的 JSON 格式无效或包含无法解析的内容。

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   使用 `request.get_json(silent=True)` 并检查返回值是否为 None。
   ```
2. **** (85% success)
   ```
   在请求头中设置 `Content-Type: application/json`，确保客户端发送有效 JSON。
   ```

## Dead Ends

- **** — 尝试使用 `request.get_json()` 但未捕获异常，导致错误直接返回。 (70% fail)
- **** — 尝试手动解析 JSON 但未处理 BOM 或编码问题。 (50% fail)
