{
  "id": "python/django-invalid-json-request",
  "signature": "json.JSONDecodeError: Expecting value: line 1 column 1 (char 0)",
  "signature_zh": "json.JSONDecodeError: 期望值：第1行第1列（字符0）",
  "regex": "json\\.JSONDecodeError:\\ Expecting\\ value:\\ line\\ 1\\ column\\ 1\\ \\(char\\ 0\\)",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The view is trying to parse request.body as JSON but the request body is empty or not valid JSON.",
  "root_cause_type": "generic",
  "root_cause_zh": "视图尝试将request.body解析为JSON，但请求体为空或不是有效的JSON。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Hides the actual error and makes debugging difficult; still fails for malformed input.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "request.POST only parses form data, not JSON payloads, so it will be empty.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Check if request.body is empty before parsing: if not request.body: return JsonResponse({'error': 'Empty body'}, status=400)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Wrap json.loads in try-except and return 400 with error message.",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}