From c547c61f898e2073c4ea267307c186b8e1040929 Mon Sep 17 00:00:00 2001 From: Cluas Date: Tue, 1 Jun 2021 17:18:33 +0800 Subject: [PATCH] json: uses proto field name instead of lowerCamelCase name (#985) --- encoding/json/json.go | 1 + 1 file changed, 1 insertion(+) diff --git a/encoding/json/json.go b/encoding/json/json.go index 826b688e6..a156fb5a0 100644 --- a/encoding/json/json.go +++ b/encoding/json/json.go @@ -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{