I am new to rest-assured and have the following code,
String json = RestAssured.get("/posts").asString();
User user = JsonPath.from(json).getObject("[0]", User.class);
assertThat(user.id, equalTo(1));
When i run the code, i get the following error,
java.lang.IllegalStateException: Cannot deserialize object because no JSON deserializer found in classpath. Please put either Jackson or Gson in the classpath.
But, jackson-core-2.0.2 is already in the classpath. Why am i getting this error, am i missing something?
Regards,
SPK
PS:
The json response has the structure as below,
[ { "userId": 1,
"id: 1,
...
}
{ "userId": 1,
"id: 2,
...
}
...
]