Here I am having 2 JSONObjects with same data as
{
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
}
I want to comapre 2 objects using TestNG.
I tried in below way but it is giving wrong results.
Assert.assertEquals(actualObject, ExpectedObject);
Can any one help me on this ?
I'd use JSONAssert - https://github.com/skyscreamer/JSONassert