Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide a generic json mapper for any entity. #183

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

Open
sadegh wants to merge 3 commits into android10:master
base: master
Choose a base branch
Loading
from sadegh:provide_generic_jason_mapper
Open

Provide a generic json mapper for any entity. #183

sadegh wants to merge 3 commits into android10:master from sadegh:provide_generic_jason_mapper

Conversation

Copy link

@sadegh sadegh commented Sep 15, 2016

Hi Fernando,

I changed UserEntityJsonMapper to a generic class named EntiityJsonMapper, so I can deserialize any kind of entity.

Hope you like it!

* @throws com.google.gson.JsonSyntaxException if the json string is not a valid json structure.
*/
public UserEntity transformUserEntity(String userJsonResponse) throws JsonSyntaxException {
public T transformUserEntity(String json) throws JsonSyntaxException {
Copy link

@alexandru-calinoiu alexandru-calinoiu Sep 17, 2016

Choose a reason for hiding this comment

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

If this is a generic entity mapper, then I think the naming of this methods should reflect it, they can be transfromFromEntity and transfromFromEntityCollection

Copy link
Author

Choose a reason for hiding this comment

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

Oops! Good catch!
Just fixed it, thanks.

alexandru-calinoiu and Weava reacted with thumbs up emoji
Copy link
Author

sadegh commented Aug 13, 2017

@android10 Just updated my PR and resolved merge conflicts.
Can you please give me your feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@alexandru-calinoiu alexandru-calinoiu alexandru-calinoiu approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /