Package org.springframework.test.json
Class JsonAssert
java.lang.Object
org.springframework.test.json.JsonAssert
Useful methods that can be used with
org.skyscreamer.jsonassert
.- Since:
- 6.2
- Author:
- Phillip Webb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonComparator
comparator
(org.skyscreamer.jsonassert.comparator.JSONComparator comparator) Create a newJsonComparator
from the given JSONAssertJSONComparator
.static JsonComparator
comparator
(org.skyscreamer.jsonassert.JSONCompareMode mode) Create a newJsonComparator
from the given JSONAssertJSONCompareMode
.static JsonComparator
comparator
(JsonCompareMode compareMode) Create aJsonComparator
from the givenJsonCompareMode
.
-
Constructor Details
-
JsonAssert
public JsonAssert()
-
-
Method Details
-
comparator
Create aJsonComparator
from the givenJsonCompareMode
.- Parameters:
compareMode
- the mode to use- Returns:
- a new
JsonComparator
instance - See Also:
-
JSONCompareMode.STRICT
JSONCompareMode.LENIENT
-
comparator
public static JsonComparator comparator(org.skyscreamer.jsonassert.comparator.JSONComparator comparator) Create a newJsonComparator
from the given JSONAssertJSONComparator
.- Parameters:
comparator
- the JSON AssertJSONComparator
- Returns:
- a new
JsonComparator
instance
-
comparator
Create a newJsonComparator
from the given JSONAssertJSONCompareMode
.- Parameters:
mode
- the JSON AssertJSONCompareMode
- Returns:
- a new
JsonComparator
instance
-