See https://github.com/spring-projects/spring-boot/issues/15967#issuecomment-2025990588 for details.
The user is suggesting that we consider an alternative to org.skyscreamer:jsonassert
since there's little maintenance activity and little appetite to fix the split package issue.
If we do consider something else, we might be able to have JsonTester
adapt to either library.
Comment From: snicoll
Good timing considering that stuff is partially moving to Spring Framework and this gives us an opportunity to adapt things a bit.
Comment From: snicoll
We could soften that particular use in the linked issue but Spring Framework 6.2 has more use of JSONAssert with the introduction of the AssertJ support. So if we want to move to something else, we could consider JsonUnit but it already depends on Spring.
I don't see us relying on JsonUnit at this stage (@lukas-krecan). @philwebb did you have any other candidates in mind?
Comment From: philwebb
It doesn't look like there's any single candidate that would work as a drop-in replacement, but we could perhaps isolate ourselves a little by not using JSONAssert types in our own API.
I sketched something at https://github.com/philwebb/spring-framework/tree/gh-32791
Comment From: snicoll
We've decided to make the use of JSONAssert optional so that users can remove the library and still use other testing features (such as JSONpath or others). This would align with what we've recently done with JSONPath in our assertJ support. However, we don't intend to offer a way for users to use our json-diff related testing API with a different JSON assertion library. For those cases, they'll have to call that themselves.
Comment From: snicoll
However, we don't intend to offer a way for users to use our json-diff related testing API with a different JSON assertion library. For those cases, they'll have to call that themselves.
Turns out we offered that by allowing a custom JSONComparator
from JSONAssert. So we do have introduced high-level methods to pass any JsonComparator
for those who want to use our API without JSONAssert. This impacts our new AssertJ support, the request and result matchers as well as WebTestClient
.