String jsonString = "
{
"success": true,
"total": 282,
"timeTaken": 31,
"responseCode": 200,
"facet_count": {},
"inferred":
{
"city": null,
"locality": null,
"cityList": null,
"state": null
}
}
";
Problem : To update "locality" value to "ABCD"
I know how to do using com.jayway, below is the code for that
Configuration configuration = Configuration.builder()
.jsonProvider(new JacksonJsonNodeJsonProvider())
.mappingProvider(new JacksonMappingProvider()).build();
DocumentContext json = com.jayway.jsonpath.JsonPath.using(configuration)
.parse(jsonString);
System.out.println(json.set("inferred.locality", "ABCD").jsonString());
But not able to do using io.rest-assured version 3.0.