I have the following JSON:
{
"X":20,
"Y":null
}
Now, for the key Y, i need to insert below json array.
{
"A":null,
"B":1,
"C":5000,
"D":0.25
}
I tried this but doesn't work:
String response1 =
given()
.cookie(apiTestSessionID)
//.spec(requestSpecification)
.when()
//.get("/service/bill/Config")
.get("/service/bill/Config/0001")
.asString();
JsonPath jsonCstmrConfig = new JsonPath(response);
String response2 = given()
.cookie(apiTestSessionID)
.when()
.get("/service/commoncache/card")
.asString();
JsonPath jsonSoiRateCard = new JsonPath(response2);
Map<String,String> maps = jsonCstmrConfig.getMap("data");
maps.put("X","Value");
Is there any way to do it with provided rest assured json library.