Class JsonSupport

java.lang.Object
io.qameta.allure.internal.json.JsonSupport

public final class JsonSupport extends Object
Internal serialization shared by Allure modules without exposing the bundled Jackson API.
  • Method Details

    • writeJson

      public static String writeJson(Object value) throws IOException
      Serializes JSON values such as maps, lists, strings, numbers, booleans, and null.
      Parameters:
      value - the JSON-compatible value
      Returns:
      the serialized JSON
      Throws:
      IOException - if serialization fails
    • writeModel

      public static String writeModel(Object value) throws IOException
      Serializes Allure model evidence using the test utilities' compact field inclusion and enum values.
      Parameters:
      value - the Allure model value
      Returns:
      formatted JSON without default-valued fields
      Throws:
      IOException - if serialization fails