# proto: invalid value for int32 field: "abc"

- **ID:** `go/protobuf-json-marshal-invalid-value`
- **Domain:** go
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The JSON value provided for an integer field is not a valid integer, causing protojson unmarshaling to fail.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   // Ensure the JSON field is a number, not a string.
// If it's a string, parse it and set the field manually.
   ```
2. **** (85% success)
   ```
   opts := protojson.UnmarshalOptions{AllowPartial: true}
err := opts.Unmarshal(data, msg)
   ```

## Dead Ends

- **** — Changing the type breaks compatibility and may not be semantically correct. (80% fail)
- **** — Custom parsers are error-prone and don't integrate with protobuf well. (70% fail)
