{
  "id": "go/protobuf-json-marshal-invalid-value",
  "signature": "proto: invalid value for int32 field: \"abc\"",
  "signature_zh": "proto: int32 字段的值无效: \"abc\"",
  "regex": "proto:\\ invalid\\ value\\ for\\ int32\\ field:\\ \"abc\"",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The JSON value provided for an integer field is not a valid integer, causing protojson unmarshaling to fail.",
  "root_cause_type": "generic",
  "root_cause_zh": "为整数字段提供的 JSON 值不是有效的整数，导致 protojson 解组失败。",
  "versions": [
    {
      "version": "1.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Changing the type breaks compatibility and may not be semantically correct.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Custom parsers are error-prone and don't integrate with protobuf well.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "// Ensure the JSON field is a number, not a string.\n// If it's a string, parse it and set the field manually.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "opts := protojson.UnmarshalOptions{AllowPartial: true}\nerr := opts.Unmarshal(data, msg)",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-02-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}