-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix LedgerObject.from_xrpl
to only accept CamelCase JSON keys
#689
Comments
I suspect all the |
I'm confused as to why this change is required. This seems like it would be a breaking change without improving the experience for users. |
It's not how that function is supposed to be used. IMO it would be an experience improvement for users, because we'd be doing some additional processing to ensure that the data you're putting into that function is actually from the XRPL and not from something else. It's also more confusing that |
Clarification: Why are we supporting The two functions ( |
That's exactly the difference between the two functions. |
Okay, I understand that. By that reasoning, I couldn't find equivalent functions in the Typescript (xrpl.js) codebase. Are we obligated to maintain consistency between the libraries? I'd prefer to maintain adherence to the XRPL encoding formats. To that end, why are we supporting |
Yes, this issue should really be about all
There are language-specific differences between the libraries. If something works better in a certain way in JS vs. Python, or if the norms are different for that language, then it'll be different. Another example of a difference based on norms in a language are how we have class models for Python but just TypeScript types (instead of classes) for JS.
It's more Pythonic to use |
ok thanks, that's helpful |
Fix
LedgerObject.from_xrpl
to only accept CamelCase JSON keys. Currently, it accepts both CamelCase and snake_case keys which is invalid functionality.Found this bug in this PR that adds Ledger Objects models - #663
The text was updated successfully, but these errors were encountered: