// not pure because parseJSON isn't pure `{"foo": "bar"}`.shouldBeSameJsonAs(`{"foo": "bar"}`); `{"foo": "bar"}`.shouldBeSameJsonAs(`{"foo":"bar"}`); `{"foo":"bar"}`.shouldBeSameJsonAs(`{"foo": "baz"}`).shouldThrow!UnitTestException; try `oops`.shouldBeSameJsonAs(`oops`); catch(Exception e) assert(e.msg == "Error parsing JSON: Unexpected character 'o'. (Line 1:1)");
If two strings represent the same JSON regardless of formatting