You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should make it easy to JSON serialize/deserialize the XDR types. This is somewhat controversial as there is no canonical format for JSON-to-XDR, so this would just be a Rust flavored JSON representation of the XDR for non-critical data use, and without any backwards compatible guarantees.
This should be added behind a feature flag so that none of the JSON functionality is included by default.
@sisuresh did some experimentation with serde_json and found it worked well:
We have to make a choice to flavor the resulting JSON fields names to be consistent with the Rust types, or consistent with the XDR. Both options are possible. The former is more aligned with the first paragraph of this issue, but the latter might make more sense too for any user of the JSON who is comparing it to the XDR. I'm inclined to lean towards the latter.
The text was updated successfully, but these errors were encountered:
We should make it easy to JSON serialize/deserialize the XDR types. This is somewhat controversial as there is no canonical format for JSON-to-XDR, so this would just be a Rust flavored JSON representation of the XDR for non-critical data use, and without any backwards compatible guarantees.
This should be added behind a feature flag so that none of the JSON functionality is included by default.
@sisuresh did some experimentation with serde_json and found it worked well:
sisuresh/rs-stellar-xdr@ebfd649#diff-20a7ada4b13b7b258fd3b69d364ba4a655f9988488e5f890094e75412b8591c6
We have to make a choice to flavor the resulting JSON fields names to be consistent with the Rust types, or consistent with the XDR. Both options are possible. The former is more aligned with the first paragraph of this issue, but the latter might make more sense too for any user of the JSON who is comparing it to the XDR. I'm inclined to lean towards the latter.
The text was updated successfully, but these errors were encountered: