How to generate dynamic PactDslJsonBody using json value? Is it possible Pact team can provide the auto builder to assign body dynamically?
Pact Body:
body(new PactDslJsonBody()
.object("testsuite")
.stringType("webId","24255")
.closeObject());
Assert Response:
"{\"testsuite\":{\"webId\":\"24255\"}}";
Based on Assert Response(as input) and create the dslbody like
String json = "{\"testsuite\":{\"webId\":\"24255\"}}"
//body(json);
body(generatePactDSLJsonBody(json));
Assert Response:
assertEqual("{\"testsuite\":{\"webId\":\"24255\"}}",json);
I know in body we can provide json itself. but i need to generate the PactDSLJson body using Json.