title: how to check if two json objects are equal in java?
body: <p>I have two large nested <code>json objects</code> which I need to compare for equality.</p>
  
  <p>I followed the following steps but failed.</p>
  
  <ol>
  <li><p>I converted the json objects into treemaps and json arrays into hashsets and finally returned a treemap for each. </p></li>
  <li><p>I used equals method of map to compare for equality.</p></li>
  <li><p>Though both the maps are sorted(treemaps) and exactly equal in key,value pairs,the comparision is resulting in not equal
  Can anyone suggest a good solution for this and the reason why the case is failing?</p></li>
  </ol>