Package org.springframework.test.json
Interface JsonComparator
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
Strategy interface used to compare JSON strings.
- Since:
 - 6.2
 - Author:
 - Phillip Webb
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptiondefault voidassertIsMatch(String expectedJson, String actualJson) Assert that theexpectedJsonmatches the comparison rules of ths instance against theactualJson.Compare the given JSON strings. 
- 
Method Details
- 
compare
Compare the given JSON strings.- Parameters:
 expectedJson- the expected JSONactualJson- the actual JSON- Returns:
 - the JSON comparison
 
 - 
assertIsMatch
Assert that theexpectedJsonmatches the comparison rules of ths instance against theactualJson. Throw anAssertionErrorif the comparison does not match.- Parameters:
 expectedJson- the expected JSONactualJson- the actual JSON
 
 -