Re:Show HN: JSON.equals in Java to compare two JSON's
by sanketsarang on Monday December 10, 2018 @09:05AM
(#18647936)
Yes this also works. We were using this for a while until we landed up with very large JSON's. .toMap() is very expensive and takes significantly longer to execute on large JSON's.
Re:Show HN: JSON.equals in Java to compare two JSON's
by sanketsarang on Monday December 10, 2018 @03:42AM
(#18646246)
No string compare does not work, as the order of elements may not be the same so the strings may not be the same. The utility will report both JSON's as equal even if order of elements is different.
Btw, downloaded java-commons as Maven dependency from JitPack: https://jitpack.io/#blobcity/java-commons