Class JsonAssert

java.lang.Object
org.springframework.test.json.JsonAssert

public abstract class JsonAssert extends Object
Useful methods that can be used with org.skyscreamer.jsonassert.
Since:
6.2
Author:
Phillip Webb
  • Constructor Details

    • JsonAssert

      public JsonAssert()
  • Method Details

    • comparator

      public static JsonComparator comparator(JsonCompareMode compareMode)
      Create a JsonComparator from the given JsonCompareMode.
      Parameters:
      compareMode - the mode to use
      Returns:
      a new JsonComparator instance
      See Also:
      • JSONCompareMode.STRICT
      • JSONCompareMode.LENIENT
    • comparator

      public static JsonComparator comparator(org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
      Create a new JsonComparator from the given JSONAssert JSONComparator.
      Parameters:
      comparator - the JSON Assert JSONComparator
      Returns:
      a new JsonComparator instance
    • comparator

      public static JsonComparator comparator(org.skyscreamer.jsonassert.JSONCompareMode mode)
      Create a new JsonComparator from the given JSONAssert JSONCompareMode.
      Parameters:
      mode - the JSON Assert JSONCompareMode
      Returns:
      a new JsonComparator instance