Using RestAssured I am trying to compare two JSON Objects.
Example : The first JSON is from excel I read it as a String and store it
String a = "Some JSON from Excel and I store it as a String";
The second JSON is a response that returns a Response Object which is actually a JSON
Response expectedResponse = RestAssured.given().contentType("application/json").header(auth).get(endpoint).then().contentType("application/json").extract().response();
I want to compare these two as JSON Objects, because when I convert the response to String and try to compare and if the order of the JSON schema changes, my assertion fails.
I tried for methods to convert the String to JSON but couldn't find any. Could someone help me solving this