{
  "id": "go/json-marshal-channels",
  "signature": "panic: json: unsupported type: chan int",
  "signature_zh": "恐慌：json：不支持的类型：chan int",
  "regex": "panic:\\ json:\\ unsupported\\ type:\\ chan\\ int",
  "domain": "go",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "尝试将channel或函数等不支持的类型序列化为JSON。",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试将channel或函数等不支持的类型序列化为JSON。",
  "versions": [
    {
      "version": "1.18",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "程序崩溃。",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "json.Marshal不处理channel。",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "在结构体中使用`json:\"-\"`忽略字段：\ntype Message struct {\n    Ch chan int `json:\"-\"`\n    Data string `json:\"data\"`\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "实现MarshalJSON方法自定义序列化。",
      "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": "2024-03-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}