Class JsonContent<T>
java.lang.Object
org.springframework.boot.test.json.JsonContent<T>
- Type Parameters:
 T- the source type that created the content
- All Implemented Interfaces:
 org.assertj.core.api.AssertProvider<JsonContentAssert>
public final class JsonContent<T>
extends Object
implements org.assertj.core.api.AssertProvider<JsonContentAssert>
JSON content usually created from a JSON tester. Generally used only to
 
provide JsonContentAssert to AssertJ assertThat
 calls.- Since:
 - 1.4.0
 - Author:
 - Phillip Webb, Diego Berrueta
 
- 
Constructor Summary
ConstructorsConstructorDescriptionJsonContent(Class<?> resourceLoadClass, ResolvableType type, String json) Create a newJsonContentinstance. - 
Method Summary
 
- 
Constructor Details
- 
JsonContent
Create a newJsonContentinstance.- Parameters:
 resourceLoadClass- the source class used to load resourcestype- the type under test (ornullif not known)json- the actual JSON content
 
 - 
 - 
Method Details
- 
assertThat
Deprecated.to prevent accidental use. Prefer standard AssertJassertThat(context)...calls instead.Use AssertJ'sassertThatinstead.- Specified by:
 assertThatin interfaceorg.assertj.core.api.AssertProvider<T>
 - 
getJson
Return the actual JSON content string.- Returns:
 - the JSON content
 
 - 
toString
 
 -