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

pull/987/head
Cluas 4 years ago committed by GitHub
parent bef6d8d818
commit c547c61f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      encoding/json/json.go

@ -16,6 +16,7 @@ var (
// MarshalOptions is a configurable JSON format marshaler. // MarshalOptions is a configurable JSON format marshaler.
MarshalOptions = protojson.MarshalOptions{ MarshalOptions = protojson.MarshalOptions{
EmitUnpopulated: true, EmitUnpopulated: true,
UseProtoNames: true,
} }
// UnmarshalOptions is a configurable JSON format parser. // UnmarshalOptions is a configurable JSON format parser.
UnmarshalOptions = protojson.UnmarshalOptions{ UnmarshalOptions = protojson.UnmarshalOptions{

Loading…
Cancel
Save