-
Notifications
You must be signed in to change notification settings - Fork 23
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
JSON Support #124
Comments
@janewang FYI |
@janewang @mollykarcher suggestion: asking the user to pass a parameter |
@Shaptic I think that's where we started with. However, the format of the rpc response is technically already in JSON, with XDR strings. |
|
Fine with preserving the option to unpack XDR to another format. However, I think after we unpack to JSON, convert to other formats should not be the responsibility at this layer. I think |
Developers have the option to request data in JSON format. By default, responses are in the current XDR+JSON format unless specified otherwise in the request. If JSON format is requested, the system will dynamically convert the XDR data to JSON for easier readability and use by developers.
In order to:
'xdrFormat’: 'json'
in the request.xdrFormat
in the request, or include'xdrFormat': 'base64'
in the request. The response will return the current JSON and XDR in base64 string.The initial implementation is then backward compatible.
Example Usage for JSON response:
We have developed a canonical XDR ⇔ JSON schema for conversion between XDR and JSON: Stellar JSON
See https://docs.google.com/document/d/1tTuzL7HBHedp9TE-LonD1QV67SaBSReQ8YFj9xQIgtA/edit#heading=h.uedyb8nrk3a9
The text was updated successfully, but these errors were encountered: