Skip to content

Support to decode metadata in the API that list ledgers #2311

@fantapsody

Description

@fantapsody

FEATURE REQUEST

  1. Please describe the feature you are requesting.

The current list ledgers API output the metadata in a serialized binary format, which is not friendly to human operators and external tools, and is not consistent with the output of the API that gets the metadata. For example:

curl 'localhost:8080/api/v1/ledger/list?print_metadata=true'
{
  "0" : "BookieMetadataFormatVersion\t3\n(\b\u0001\u0010\u0001\u0018��\u0006\u0007(\u00032\u0011\n\r10.0.0.9:3181\u0010\u00008\u0003B\u0000H\u0001`\u0000"
}
  1. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have).
    Are you currently using any workarounds to address this issue?
    This is a should-have feature, otherwise, all eternal tools rely on this API have to deserialize the metadata by themselves, which is much harder than to parse a plaintext JSON object.

  2. Provide any additional detail on your proposed use case for this feature.

Add a parameter such as decode_meta, and output the ledger metadata in decoded format when the parameter presents and the value of it is 'true'.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions