The jsonpb
implementation of golang/protobuf
has very bad error handling, making it hard to return human-understandable errors.
This is a fork of the Unmarshal
functionality of jsonpb
with fixes for error handling:
- Errors are are now prefixed with a "stack" path of fields that are returned in
- Poor "cannot deserialize into `json.RawMessage" errors now use proper types
- Unknown fields now return a helpful message listing known fields :)
Relevant upstream Issue: golang/protobuf#266