mod+lnrpc: use hex encoding jsonpb fork

This commit is contained in:
Oliver Gugger committed 2023-05-11 22:52:52 +02:00
1 parent 9615ce20d6
commit b5d23bba06
3 files changed
+9 -26

No files matched your search

+3 -7
View File
@@ -22,23 +22,19 @@ var (
// options for marshaling protobuf messages into JSON in a
// human-readable way. This should only be used in the CLI and in
// integration tests.
//
// TODO(guggero): Use custom fork of this library to support hex
// encoding byte slices instead of the default base64 encoding.
ProtoJSONMarshalOpts = &protojson.MarshalOptions{
EmitUnpopulated: true,
UseProtoNames: true,
Indent: " ",
UseHexForBytes: true,
}
// ProtoJSONUnmarshalOpts is a struct that holds the default unmarshal
// options for un-marshaling lncli JSON into protobuf messages. This
// should only be used in the CLI and in integration tests.
//
// TODO(guggero): Use custom fork of this library to support hex
// encoding byte slices instead of the default base64 encoding.
ProtoJSONUnmarshalOpts = &protojson.UnmarshalOptions{
AllowPartial: false,
AllowPartial: false,
UseHexForBytes: true,
}
// RESTJsonMarshalOpts is a struct that holds the default marshal