Skip to content

Configurable AllowUnknownFields in jsonpb?Β #448

Closed
@lantame

Description

Now unknown object fields are silently dropped.
If I want to handle such cases, I have to provide a custom unmarshaller (likely by copying all unmarshalling stuff from runtime/marshal_jsonpb.go and changing AllowUnknownFields to false). Isn't it better to make this parameter configurable?

P.S. There will probably be some API change:
type JSONPb jsonpb.Marshaler will likely change to
type JSONPb struct{...}
Which will require existing code modification.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions