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

Deserializing record to custom subclass #65

Open
cheungpat opened this issue Nov 28, 2016 · 0 comments
Open

Deserializing record to custom subclass #65

cheungpat opened this issue Nov 28, 2016 · 0 comments

Comments

@cheungpat
Copy link
Contributor

From the chat SDK, there is some code to copy a SKYRecord and create a custom subclass (such as SKYMessage. I suggest that we make ``SKYRecordDeserializer deserializer]` to return a singleton object and SDK user can register subclass to be used for deserialization when the deserializer encounter certain types:

id der = [SKYRecordDeserializer deserializer];
[der registerRecordClass:[SKYMessage class] forType:@"message"];

id record = [der recordWithDictionary:recordDict];
[record isKindOfClass:[SKYMessage class]]; // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant