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
  • Method Details

    • assertThat

      public JsonContentAssert assertThat()
      Use AssertJ's assertThat instead.
      Specified by:
      assertThat in interface org.assertj.core.api.AssertProvider<JsonContentAssert>
    • getJson

      public String getJson()
      Return the actual JSON content string.
      Returns:
      the JSON content
    • toString

      public String toString()
      Overrides:
      toString in class Object