{
  "id": "go/encoding-json-unmarshal-into-map-with-non-string-key",
  "signature": "error: json: cannot unmarshal object into Go value of type map[int]string",
  "signature_zh": "错误：json：无法将对象解组为map[int]string类型的Go值",
  "regex": "error:\\ json:\\ cannot\\ unmarshal\\ object\\ into\\ Go\\ value\\ of\\ type\\ map\\[int\\]string",
  "domain": "go",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "JSON object keys are always strings, but the target map has non-string key type like int.",
  "root_cause_type": "generic",
  "root_cause_zh": "JSON对象键始终是字符串，但目标映射具有非字符串键类型如int。",
  "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": "Using string key map and converting manually",
      "why_fails": "Works but inefficient; use map[string]interface{} and convert.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use map[string]interface{} and then convert keys",
      "success_rate": 0.9,
      "how": "var raw map[string]interface{}\njson.Unmarshal(data, &raw)\nresult := make(map[int]string)\nfor k, v := range raw {\n    i, _ := strconv.Atoi(k)\n    result[i] = v.(string)\n}",
      "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-02-25",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}