Class JsonBuilderSerializer

java.lang.Object
io.restassured.internal.path.json.JsonBuilderSerializer

public class JsonBuilderSerializer extends Object
Serializes a Map or Collection request body to JSON exactly like Groovy's JsonBuilder does, so that modules without a Groovy dependency can produce the same JSON. Internal API.
  • Method Details

    • toJson

      public static String toJson(Object mapOrCollection)
      Parameters:
      mapOrCollection - the Map or Collection to serialize
      Returns:
      the JSON produced by new JsonBuilder(mapOrCollection).toString()