{
  "id": "python/fastapi-json-decode-error",
  "signature": "fastapi.exceptions.RequestValidationError: JSON decode error\n  Expecting value: line 1 column 1 (char 0)",
  "signature_zh": "fastapi.exceptions.RequestValidationError: JSON 解码错误：期望值：第 1 行第 1 列 (字符 0)",
  "regex": "fastapi\\.exceptions\\.RequestValidationError:\\ JSON\\ decode\\ error\\\n\\ \\ Expecting\\ value:\\ line\\ 1\\ column\\ 1\\ \\(char\\ 0\\)",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The client sent an empty or non-JSON body while the endpoint expects application/json.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端发送了空请求体或非 JSON 请求体，而端点期望 application/json。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Header alone does not provide parseable JSON; still fails.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Parsing occurs before the handler in FastAPI.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "async def create(item: Item | None = None): ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "from fastapi import Body\nasync def create(item: Item = Body(default=None)): ...",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-14",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}