|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.skyscreamer.jsonassert.JSONCompare
public class JSONCompare
Provides the logic to compare two JSON entities. This is the backend to JSONAssert, but it can
be programmed against directly to access the functionality. (eg, to make something that works with a
non-JUnit test framework)
| Method Summary | |
|---|---|
static JSONCompareResult |
compareJSON(org.json.JSONArray expected,
org.json.JSONArray actual,
JSONCompareMode mode)
Compares JSONArray provided to the expected JSONArray, and returns the results of the comparison. |
static JSONCompareResult |
compareJSON(org.json.JSONObject expected,
org.json.JSONObject actual,
JSONCompareMode mode)
Compares JSONObject provided to the expected JSONObject, and returns the results of the comparison. |
static JSONCompareResult |
compareJSON(String expectedStr,
String actualStr,
JSONCompareMode mode)
Compares JSON string provided to the expected JSON string, and returns the results of the comparison. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static JSONCompareResult compareJSON(String expectedStr,
String actualStr,
JSONCompareMode mode)
throws org.json.JSONException
expectedStr - Expected JSON stringactualStr - JSON string to comparemode - Defines comparison behavior
org.json.JSONException
public static JSONCompareResult compareJSON(org.json.JSONObject expected,
org.json.JSONObject actual,
JSONCompareMode mode)
throws org.json.JSONException
expected - Expected JSONObjectactual - JSONObject to comparemode - Defines comparison behavior
org.json.JSONException
public static JSONCompareResult compareJSON(org.json.JSONArray expected,
org.json.JSONArray actual,
JSONCompareMode mode)
throws org.json.JSONException
expected - Expected JSONArrayactual - JSONArray to comparemode - Defines comparison behavior
org.json.JSONException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||