1
0
mirror of https://github.com/go-kratos/kratos.git synced 2026-05-22 10:15:24 +02:00

json: uses proto field name instead of lowerCamelCase name (#985)

This commit is contained in:
Cluas
2021-06-01 17:18:33 +08:00
committed by GitHub
parent bef6d8d818
commit c547c61f89
+1
View File
@@ -16,6 +16,7 @@ var (
// MarshalOptions is a configurable JSON format marshaler.
MarshalOptions = protojson.MarshalOptions{
EmitUnpopulated: true,
UseProtoNames: true,
}
// UnmarshalOptions is a configurable JSON format parser.
UnmarshalOptions = protojson.UnmarshalOptions{