connect icon indicating copy to clipboard operation
connect copied to clipboard

Adds functionality to `schema_registry_decode` to emit defaults or not

Open hendoxc opened this issue 1 year ago • 1 comments

What

This PR allows users to specify different behaviour for schema_registry_decode when decoding protobuf messages; allowing them to chose to Emit defaults.

Why

if a protobuf message like {"a": 0, "b": 1} is encoded to protobuf, when we decode with schema_registry_decode the resulting message is {"b": 1} and the keyval "a": 0 is lost.

This behaviour is controlled from protojson.MarshalerOpts with the field EmitDefaultValues, which by fault is false.

hendoxc avatar Sep 09 '24 20:09 hendoxc

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 09 '24 20:09 CLAassistant

Currently facing this issue. Any updates on this?

ntx-ben avatar Nov 14 '24 22:11 ntx-ben