[SEP-51] XDR-JSON #1702
Replies: 1 comment 2 replies
-
Hi everyone, I wanted to highlight a couple changes that were proposed on the rs-stellar-xdr and xdrgen repositories that are specifically related to the XDR-JSON specification. Now that XDR-JSON is SEP-51 I think we should discuss the changes separate to the implementation.
Both changes involve changing the JSON type to string, for numbers that can't be stored in a JavaScript Number (53-bit precision limit). I'm particularly interested in gathering input on each to ensure that the specification evolves in a way that meets the needs of developers and users, with the reminder that XDR-JSON's goal is to serve humans, especially developers, and not machines. If you have thoughts, ideas, or concerns about any of these proposed changes, please comment. |
Beta Was this translation helpful? Give feedback.
-
I've opened a pull request containing a SEP that captures the existing XDR-JSON data format that is implemented in the Rust rs-stellar-xdr crate, and shows up as a feature in the stellar-cli xdr subcommand.
This SEP is intended to be a living document, a specification, and to evolve with XDR-JSON as it evolves, unless of course a proposal to modify it makes such significant changes that amount to a different proposal.
All and any feedback appreciated. Because this SEP captures existing and already adopted behaviour the most useful feedback at this moment is whether the document captures it accurately, and in a way that is easily digestible and replicable in new libraries or new tooling that needs to decode it.
The only existing implementation in rs-stellar-xdr implements the proposal in it's entirety except the support for specifying the
$schema
key for which there is an open issue at one of the links below.It is worth noting that it is very likely breaking changes will be made to the specification as it is still relatively new. One example is the high likelihood that the 64-bit integer type from a JSON Number to a JSON String, and that ScVal number types like 128bit and 256bit will become string numbers as well. There are open issues related to changes to the schema at these places:
Once this SEP is merged, future changes to the schema can be discussed as discussions at https://github.com/stellar/stellar-protocol/discussions, either as completely new discussions, or as sub-conversations here in this discussion.
Beta Was this translation helpful? Give feedback.
All reactions