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 SummaryModifier and TypeMethodDescriptiondefault voidassertIsMatch(@Nullable String expectedJson, @Nullable String actualJson) Assert that theexpectedJsonmatches the comparison rules of ths instance against theactualJson.Compare the given JSON strings.
- 
Method Details- 
compareCompare the given JSON strings.- Parameters:
- expectedJson- the expected JSON
- actualJson- the actual JSON
- Returns:
- the JSON comparison
 
- 
assertIsMatchAssert that theexpectedJsonmatches the comparison rules of ths instance against theactualJson. Throw anAssertionErrorif the comparison does not match.- Parameters:
- expectedJson- the expected JSON
- actualJson- the actual JSON
 
 
-