{
  "id": "go/encoding-json-unexpected-end-of-json-input",
  "signature": "error: unexpected end of JSON input",
  "signature_zh": "错误：意外的JSON输入结束",
  "regex": "error:\\ unexpected\\ end\\ of\\ JSON\\ input",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The JSON decoder reached the end of input before completing a valid JSON structure, often due to truncated data or empty input.",
  "root_cause_type": "generic",
  "root_cause_zh": "JSON解码器在完成有效JSON结构之前到达输入末尾，通常由于数据截断或空输入。",
  "versions": [
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Assuming the error is always a server bug",
      "why_fails": "Often caused by network issues or partial reads; retrying may help but not always.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use io.ReadAll to read full body before decoding",
      "success_rate": 0.9,
      "how": "body, err := io.ReadAll(resp.Body)\nif err != nil { return err }\nif len(body) == 0 { return errors.New(\"empty response\") }\njson.Unmarshal(body, &target)",
      "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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}