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

Add Lambda support for Skygear Data Type #237

Merged
merged 4 commits into from
May 16, 2018

Conversation

cheungpat
Copy link
Contributor

connects #230

cheungpat added 2 commits May 7, 2018 18:27
The value serializer provides serialization outside the context of
a record. It uses include serializing lambda parameters and return
values.
@cheungpat cheungpat force-pushed the more-lambda-types branch from b08047a to bc81286 Compare May 7, 2018 10:27
Copy link
Contributor

@carmenlau carmenlau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of TypedLambdaResponseHandler and I can use LambdaResponseHandler if I want to keep the original behavior :)

@Override
public void onSuccess(JSONObject result) {
try {
this.onLambdaSuccess((T)ValueSerializer.deserialize(result));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result here is the full response payload, I think we should remove the key of "result". Now that we can assign different generic instead of hashmap only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh really? sorry i miss that will fix

cheungpat added 2 commits May 14, 2018 12:38
Before this commit, the developer has to get the "result" value
from a map. This commit changed this behavior so that whatever value
is in the "result" key is immediately available.
Copy link
Contributor

@carmenlau carmenlau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@carmenlau carmenlau merged commit 7b2e77e into SkygearIO:master May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants