code: public static JSONCompareResult compareJSON(JSONObject expected, JSONObject actual, JSONCompareMode mode)
              throws JSONException {
          return compareJSON(expected, actual, getComparatorForMode(mode));
      }
docs: Compares JSONObject provided to the expected JSONObject, and returns the results of the comparison.
  
  @param expected Expected JSONObject
  @param actual   JSONObject to compare
  @param mode     Defines comparison behavior
  @return result of the comparison
  @throws JSONException JSON parsing error