net.serenitybdd.rest.JsonConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serenity-rest-assured Show documentation
Show all versions of serenity-rest-assured Show documentation
Serenity RestAssured integration
package net.serenitybdd.rest;
import com.google.gson.JsonParser;
import org.apache.commons.lang3.StringUtils;
/**
* User: YamStranger
* Date: 4/15/16
* Time: 9:14 AM
*/
public class JsonConverter {
public static String formatted(final String body) {
if (StringUtils.isEmpty(body)) {
return "";
} else {
return new JsonParser().parse(body).toString();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy