The actual JSON object.
The excpected JSON.
Exception message.
The file name that the assert failed in. Should be left as default.
The file line that the assert failed in. Should be left as default.
If an JSON objects is not equal, will throw an UnitTestException.
1 // Will throw an exception like "UnitTestException@example.d(6): Error parsing JSON: Unexpected end of data. (Line 1:10)" 2 `{"test" :1`.shouldBeEqualJSON(`{"test":1}`); 3 4 // Will throw an exception like "UnitTestException@example.d(6):`{"test" :1, "some" : "12"}`.shouldBeEqualJSON(`{"test":1}`); 5 `{"test" :1, "some" : "12"}`.shouldBeEqualJSON(`{"test":1}`);
Used to assert that JSON object is equal.