mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-23 13:51:00 +00:00
pb2json allow extra fields to merge with
This commit is contained in:
parent
323838d41e
commit
4c55093f6a
@ -76,9 +76,8 @@ def json2pb(pb, js):
|
||||
|
||||
|
||||
|
||||
def pb2json(pb):
|
||||
def pb2json(pb, js={}):
|
||||
''' convert google.protobuf.descriptor instance to JSON string '''
|
||||
js = {}
|
||||
# fields = pb.DESCRIPTOR.fields #all fields
|
||||
fields = pb.ListFields() # only filled (including extensions)
|
||||
for field, value in fields:
|
||||
|
Loading…
Reference in New Issue
Block a user