Package org.springframework.test.json
Class JsonContent
java.lang.Object
org.springframework.test.json.JsonContent
- All Implemented Interfaces:
org.assertj.core.api.AssertProvider<JsonContentAssert>
public final class JsonContent
extends Object
implements org.assertj.core.api.AssertProvider<JsonContentAssert>
- Since:
- 6.2
- Author:
- Phillip Webb, Diego Berrueta
-
Constructor Summary
ConstructorDescriptionJsonContent
(String json) Create a newJsonContent
instance.JsonContent
(String json, HttpMessageContentConverter contentConverter) Create a newJsonContent
instance with the message converter to use to deserialize content. -
Method Summary
-
Constructor Details
-
JsonContent
Create a newJsonContent
instance with the message converter to use to deserialize content.- Parameters:
json
- the actual JSON contentcontentConverter
- the content converter to use
-
JsonContent
Create a newJsonContent
instance.- Parameters:
json
- the actual JSON content
-
-
Method Details
-
assertThat
Use AssertJ'sassertThat
instead.- Specified by:
assertThat
in interfaceorg.assertj.core.api.AssertProvider<JsonContentAssert>
-
getJson
Return the actual JSON content string. -
toString
-