{
  "id": "go/encoding-json-invalid-utf8-in-string",
  "signature": "error: invalid UTF-8 in string literal",
  "signature_zh": "错误：字符串字面量中存在无效的UTF-8",
  "regex": "error:\\ invalid\\ UTF\\-8\\ in\\ string\\ literal",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "JSON input contains invalid UTF-8 byte sequences within a string, violating JSON specification.",
  "root_cause_type": "generic",
  "root_cause_zh": "JSON输入在字符串中包含无效的UTF-8字节序列，违反了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": "Using strings.Replace to remove non-UTF8 characters",
      "why_fails": "May corrupt data; better to use utf8.ValidString and reject or sanitize.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use json.Decoder with DisallowUnknownFields and validate input",
      "success_rate": 0.85,
      "how": "decoder := json.NewDecoder(reader)\ndecoder.DisallowUnknownFields()\nif err := decoder.Decode(&target); err != nil { /* handle */ }",
      "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.8,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}