-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistently show ledger_index as integer on JSON output #4820
Consistently show ledger_index as integer on JSON output #4820
Conversation
This resolves this issue: #3652 |
761104f
to
4548a30
Compare
4548a30
to
7a1ab1f
Compare
May want to revert this commit, if we decide to keep it at API version 3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I left one suggestion, but it's not a biggie.
b3cb87e
to
ff9e616
Compare
@Bronek please update this PR so the change applies in api_version 2 |
We have this corresponding issue for Clio to maintain parity XRPLF/clio#1014 @Bronek @intelliot would be appreciated if we can have a rippled issue created with the API Change label in the future so we can catch these breaking API changes quicker for Clio folks to work on that side 🙏 |
For api_version 2, always return ledger_index as integer in JSON output. api_version 1 retains prior behavior.
High Level Overview of Change
Several methods in API version 1 return
ledger_index
as a quoted number, i.e. string type. This value should be consistently returned as a number. It was reported in XRPLF/clio#722 (comment) and I missed it in earlier changes meant for API version 2Context of Change
.gitignore
, formatting, dropping support for older tooling)API Impact
libxrpl
change (any change that may affectlibxrpl
or dependents oflibxrpl
)Before / After
Before:
JSON output from
ledger
would contain ledger as string e.g."ledger_index": "54300932"
After
JSON output from
ledger
would contain ledger as number e.g."ledger_index": 54300932