Daily Archives: 15.06.2021

Nullable fields in json generated from protobuf file

Native support With grpc v2 for go, protofile’s optional option is supported, so you don’t need to import proto extensions anymore and use things like google.protobuf.StringValue. my.proto

go mapper

Legacy way with extensions Null for nil value my.proto

go mapper

Which will lead to this json response

Omit a field …

Read more