lncli: use original snake_case names for JSON serializing

Because we now use printRespJSON everywhere where we print RPC
responses as JSON, we can simply instruct the jsonpb marshaler to
use the original snake_case name specified in the proto file for
the JSON field names and not the default camelCase.
This commit is contained in:
Oliver Gugger committed 2020-03-07 11:22:36 +01:00
1 parent 165769ea82
commit e435cd5fc6
1 file changed
+1
+1
View File
@@ -57,6 +57,7 @@ func printJSON(resp interface{}) {
func printRespJSON(resp proto.Message) {
jsonMarshaler := &jsonpb.Marshaler{
EmitDefaults: true,
OrigName: true,
Indent: " ",
}