protogen: Fix oneof JSON marshaling

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-08-26 14:19:28 +03:00
parent ad24052ad9
commit 2bdcbe4d44

View file

@ -159,8 +159,6 @@ func emitJSONMarshal(g *protogen.GeneratedFile, msg *protogen.Message) {
g.P("case *", ff.GoIdent, ":")
emitJSONFieldWrite(g, ff, "xx", i == 0)
}
g.P("default:")
g.P(`out.RawString("null")`)
g.P("}")
continue
}