You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using? go version go1.16.2 darwin/amd64 v1.5.1
What did you do?
We are using a field with a message, which implements jsonpb. JSONPBUnmarshaler to implement NullValue like behaviour for our own messages. This is very similar to the old behaviour of TestUnmarshalNullWithJSONPBUnmarshaler (pre: cc376d7)
What did you expect to see?
When I receive null json value in a nested field, which implements jsonpb. JSONPBUnmarshaler, I expect UnmarshalJSONPB to be called.
I other words, I expect test TestUnmarshalNullWithJSONPBUnmarshaler in form pre cc376d7 to pass.
What did you see instead?
nil is assigned to this field.
I am aware that some breaking changes in similar area have been announced: https://github.com/golang/protobuf/releases#v1.4-nil-values But from what I understand, these release notes are about changes in handling nil go structures, whereas my change is about handling null json elements.
I created a pull request which resolves this issue #1300
The text was updated successfully, but these errors were encountered:
The github.com/golang/protobuf module is deprecated. We only accept changes to documentation, bugs fixes with justifiable impact, or fixes for a regression. Since this is fixing a regression, it seem appropriate to restore this functionality.
What version of protobuf and what language are you using?
go version go1.16.2 darwin/amd64
v1.5.1
What did you do?
We are using a field with a message, which implements
jsonpb. JSONPBUnmarshaler
to implementNullValue
like behaviour for our own messages. This is very similar to the old behaviour ofTestUnmarshalNullWithJSONPBUnmarshaler
(pre: cc376d7)What did you expect to see?
When I receive
null
json value in a nested field, which implementsjsonpb. JSONPBUnmarshaler
, I expectUnmarshalJSONPB
to be called.I other words, I expect test
TestUnmarshalNullWithJSONPBUnmarshaler
in form pre cc376d7 to pass.What did you see instead?
nil
is assigned to this field.I am aware that some breaking changes in similar area have been announced: https://github.com/golang/protobuf/releases#v1.4-nil-values But from what I understand, these release notes are about changes in handling
nil
go structures, whereas my change is about handlingnull
json elements.I created a pull request which resolves this issue #1300
The text was updated successfully, but these errors were encountered: