'json comparison failing after springboot 2.6 +upgrade

I have upgraded my springboot from 2.4+ to 2.6 plus. after doing this, in one of my end to end test the comparison between my actual and expected json is failing. on inspection i found that the actual json which i'm getting as a result from running the test has extra white space inside, while all the other content and values are same.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source