{
  "id": "python/flask-json-request-invalid",
  "signature": "werkzeug.exceptions.BadRequest: 400 Bad Request: Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)",
  "signature_zh": "Werkzeug 异常：400 错误请求：无法解码 JSON 对象：期望值：第 1 行第 1 列（字符 0）",
  "regex": "werkzeug\\.exceptions\\.BadRequest:\\ 400\\ Bad\\ Request:\\ Failed\\ to\\ decode\\ JSON\\ object:\\ Expecting\\ value:\\ line\\ 1\\ column\\ 1\\ \\(char\\ 0\\)",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The request body is not valid JSON when Flask tries to parse it via request.get_json().",
  "root_cause_type": "generic",
  "root_cause_zh": "当 Flask 尝试通过 request.get_json() 解析时，请求体不是有效的 JSON。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Still raises JSONDecodeError if the body is invalid.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This doesn't help the client fix their request; they need to send valid JSON.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Validate first: if request.is_json: data = request.get_json() else: return {'error': 'Invalid JSON'}, 400",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use request.get_json(silent=True) which returns None on error and handle it",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-06-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}