{
  "id": "go/encoding-json-unmarshal-nil-pointer",
  "signature": "error: json: Unmarshal(nil *main.MyStruct)",
  "signature_zh": "错误：json：Unmarshal(nil *main.MyStruct)",
  "regex": "error:\\ json:\\ Unmarshal\\(nil\\ \\*main\\.MyStruct\\)",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Passing a nil pointer to json.Unmarshal, which cannot unmarshal into a nil target.",
  "root_cause_type": "generic",
  "root_cause_zh": "向json.Unmarshal传递nil指针，无法将数据解组到nil目标。",
  "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": "Ignoring nil check before unmarshaling",
      "why_fails": "Leads to panic; always initialize target variable.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Always initialize the target variable before unmarshaling",
      "success_rate": 0.98,
      "how": "var myStruct MyStruct\nif err := json.Unmarshal(data, &myStruct); err != nil { return err }",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-03-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}