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
Describe the bug
passing OneOf field in request will fail with error:
'''json: cannot unmarshal object into Go struct field'''
To Reproduce
Is the issue reproducible?
Yes
Steps to reproduce the behavior:
Create a Cadence workflow that takes in a request field that contains a OneOf protobuf field.
Deserializing the input will fail with error '''json: cannot unmarshal object into Go struct field'''
Expected behavior
the oneof field should be supported.
Additional context
The root cause could be because cadence uses encode/json for serialization+deserialization. And this lib doesn't work for oneof fields. My current workaround is: before calling cadence, convert fields that contain Oneof to json string with package: "github.com/gogo/protobuf/jsonpb". then convert it back to proto field in Cadence workflow.
The text was updated successfully, but these errors were encountered:
Describe the bug
passing OneOf field in request will fail with error:
'''json: cannot unmarshal object into Go struct field'''
To Reproduce
Is the issue reproducible?
Steps to reproduce the behavior:
Create a Cadence workflow that takes in a request field that contains a OneOf protobuf field.
Deserializing the input will fail with error '''json: cannot unmarshal object into Go struct field'''
Expected behavior
the oneof field should be supported.
Additional context
The root cause could be because cadence uses encode/json for serialization+deserialization. And this lib doesn't work for oneof fields. My current workaround is: before calling cadence, convert fields that contain Oneof to json string with package: "github.com/gogo/protobuf/jsonpb". then convert it back to proto field in Cadence workflow.
The text was updated successfully, but these errors were encountered: