1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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{