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>
JSON content which is generally used to provide JsonContentAssert to AssertJ assertThat calls.
Since:
6.2
Author:
Phillip Webb, Diego Berrueta
  • Constructor Details

    • JsonContent

      public JsonContent(String json, @Nullable JsonConverterDelegate converterDelegate)
      Create a new JsonContent instance with the message converter to use to deserialize content.
      Parameters:
      json - the actual JSON content
      converterDelegate - the content converter to use
    • JsonContent

      @Deprecated(since="7.0", forRemoval=true) public JsonContent(String json, @Nullable HttpMessageContentConverter converter)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new JsonContent instance with the message converter to use to deserialize content.
      Parameters:
      json - the actual JSON content
      converter - the content converter to use
    • JsonContent

      public JsonContent(String json)
      Create a new JsonContent instance.
      Parameters:
      json - the actual JSON content
  • Method Details