mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-23 08:11:48 +02:00
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:
@@ -57,6 +57,7 @@ func printJSON(resp interface{}) {
|
||||
func printRespJSON(resp proto.Message) {
|
||||
jsonMarshaler := &jsonpb.Marshaler{
|
||||
EmitDefaults: true,
|
||||
OrigName: true,
|
||||
Indent: " ",
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user