[#107] 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 4a00ef946f
commit 937a53683a

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
}