In order to test a JSON API I am using JSONAssert. The actual and
expected output are already JSONObject objects, so I am just comparing
them:
JSONObject expected = new JSONObject(expectedString);
JSONAssert.assertEquals(expected, actual, false);
However, one of the properties in the actual object are Longs, while
the created expected object uses Integers. The solution I came up with
is to convert the actual object to a string and use this:
In order to test a JSON API I am using JSONAssert. The actual and expected output are already JSONObject objects, so I am just comparing them:
However, one of the properties in the actual object are Longs, while the created expected object uses Integers. The solution I came up with is to convert the actual object to a string and use this:
Possibly related to issue #23.