/** * Compares JSONArray provided to the expected JSONArray, and returns the results of the comparison. * * @param expected Expected JSONArray * @param actual JSONArray to compare * @param mode Defines comparison behavior * @return result of the comparison * @throws JSONException JSON parsing error */ public static JSONCompareResult compareJSON(JSONArray expected, JSONArray actual, JSONCompareMode mode) throws JSONException { return compareJSON(expected, actual, getComparatorForMode(mode)); }
/** * Compares JSON string provided to the expected JSON string, and returns the results of the comparison. * * @param expectedStr Expected JSON string * @param actualStr JSON string to compare * @param mode Defines comparison behavior * @return result of the comparison * @throws JSONException JSON parsing error */ public static JSONCompareResult compareJSON(String expectedStr, String actualStr, JSONCompareMode mode) throws JSONException { return compareJSON(expectedStr, actualStr, getComparatorForMode(mode)); }
/** * 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 */ public static JSONCompareResult compareJSON(JSONObject expected, JSONObject actual, JSONCompareMode mode) throws JSONException { return compareJSON(expected, actual, getComparatorForMode(mode)); }
/** * 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 */ public static JSONCompareResult compareJSON(JSONObject expected, JSONObject actual, JSONCompareMode mode) throws JSONException { return compareJSON(expected, actual, getComparatorForMode(mode)); }
/** * Compares JSONArray provided to the expected JSONArray, and returns the results of the comparison. * * @param expected Expected JSONArray * @param actual JSONArray to compare * @param mode Defines comparison behavior * @return result of the comparison * @throws JSONException JSON parsing error */ public static JSONCompareResult compareJSON(JSONArray expected, JSONArray actual, JSONCompareMode mode) throws JSONException { return compareJSON(expected, actual, getComparatorForMode(mode)); }
/** * Compares JSON string provided to the expected JSON string, and returns the results of the comparison. * * @param expectedStr Expected JSON string * @param actualStr JSON string to compare * @param mode Defines comparison behavior * @return result of the comparison * @throws JSONException JSON parsing error */ public static JSONCompareResult compareJSON(String expectedStr, String actualStr, JSONCompareMode mode) throws JSONException { return compareJSON(expectedStr, actualStr, getComparatorForMode(mode)); }