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 Lists? #14

Closed
Ryan-ZA opened this issue Feb 16, 2014 · 2 comments
Closed

Deserializing Lists? #14

Ryan-ZA opened this issue Feb 16, 2014 · 2 comments

Comments

@Ryan-ZA
Copy link

Ryan-ZA commented Feb 16, 2014

What's the correct way to handle this?

/rest/clients -> returns json of List
/rest/clients/id -> returns json of Client

The main docs say to use
public static interface ClientMapper extends ObjectMapper {}

Should there then also be a
public static interface ClientMapper extends ObjectMapper<List> {} ?

Would this not generate duplicate code?

@nmorel
Copy link
Owner

nmorel commented Feb 16, 2014

Yes, you need an ObjectMapper<List<Client>> too. There will be no duplicate in generated code. The deserializer for Client will be reused.

@Ryan-ZA
Copy link
Author

Ryan-ZA commented Feb 16, 2014

Great, thanks

@Ryan-ZA Ryan-ZA closed this as completed Feb 16, 2014
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

2 participants