hmpatel / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Map to Object #121

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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