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

Map to Object #59

Closed
johanhaleby opened this issue Jul 20, 2015 · 3 comments
Closed

Map to Object #59

johanhaleby opened this issue Jul 20, 2015 · 3 comments

Comments

@johanhaleby
Copy link
Collaborator

E.g. 

Greeting greeting = 
get("/something").andMap().path("greeting.firstName").and().path("greeting.lastN
ame").to(Greeting.class);


Original issue reported on code.google.com by johan.ha...@gmail.com on 6 Oct 2011 at 4:54

@johanhaleby
Copy link
Collaborator Author

Perhaps this should be added to JsonPath and XmlPath instead? E.g.

Greeting greeting = 
get("/something").jsonPath().map().includeString("greeting.firstName").and().inc
lude("greeting.lastName").to(Greeting.class);

Original comment by johan.ha...@gmail.com on 7 Oct 2011 at 7:37

@johanhaleby
Copy link
Collaborator Author

Perhaps:

Greeting greeting = 
get("/something").jsonPath().map().path("greeting.firstName", 
String.class).and().path("greeting.lastName").to(Greeting.class);

Original comment by johan.ha...@gmail.com on 16 Dec 2011 at 3:24

@johanhaleby
Copy link
Collaborator Author

Greeting greeting = 
get("/something").andMap().path("greeting.firstName").and().path("greeting.lastN
ame").to(Greeting.class); 

Here we could determine whether to use JsonPath or XmlPath by looking at the 
content-type of the response

Original comment by johan.ha...@gmail.com on 16 Dec 2011 at 3:26

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

No branches or pull requests

1 participant