Skip to content
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

toJson & fromJson in all platforms for TokenDetails and TokenRequest objects #93

Open
mattheworiordan opened this issue Apr 25, 2017 · 2 comments

Comments

@mattheworiordan
Copy link
Member

mattheworiordan commented Apr 25, 2017

Given servers will often issue TokenDetails and TokenRequest objects and then pass these objects to clients on different platforms, it's quite plausible that people will try and encode & decode the attributes manually (which we have seen happen and fail already resulting in https://docs.ably.io/client-lib-development-guide/features/#TE6 being added).

I do not think we should make the implementation of fromJson at the discretion of the lib dev but instead make it a requirement so that we recommend using fromJson in all cases in clients receiving JSON Token* objects.

Then server-side, we should recommend everyone uses a new toJson method that ensures Token* objects are serialized in a portable way regardless of platform.

┆Issue is synchronized with this Jira Task by Unito

@mattheworiordan
Copy link
Member Author

Once this is done, we should add some notes to the docs in regards to recommended approach for serializing and deserializing Token* objects

@QuintinWillison QuintinWillison transferred this issue from ably/docs Oct 4, 2022
@sync-by-unito
Copy link

sync-by-unito bot commented Oct 17, 2022

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-2835

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants