Hi Shashika, You can try JsonUnit <https://github.com/lukas-krecan/JsonUnit>. It can compare two JSON objects and report differences. It's built on top of Jackson.
E.g- assertJsonEquals("{\"test\":1}", "{\n\"test\": 2\n}"); Results - java.lang.AssertionError: JSON documents are different: Different value found in node "test". Expected 1, got 2. or You can try JsonAssert [1]. [1] - http://jsonassert.skyscreamer.org/quickstart.html Thank you, Shiva Balachandran On Mon, Jan 26, 2015 at 5:13 PM, Shashika Karunatilaka <shashi...@wso2.com> wrote: > Hi, > > Currently i need to do the $subject for a test case, found this blog [1]. > what is the best way of doing $subject > > [1] > http://madhukaudantha.blogspot.com/2014/03/comparing-json-java-testing.html > > > Thank you. > > -- > Shashika Prabath Karunatilaka, > Software Engineer, > WSO2, Inc: http://wso2.com/ > mobile : +94 77 7487792 > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Shiva Balachandran Software Engineer WSO2 Inc. Mobile - +94 774445788 Blog - https://shivabalachandran.wordpress.com/
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev