org.mbtest.javabank.ImposterParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javabank-core Show documentation
Show all versions of javabank-core Show documentation
Native Java bindings for Mountebank
package org.mbtest.javabank;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.mbtest.javabank.http.imposters.Imposter;
public class ImposterParser {
public static Imposter parse(String json) throws ParseException {
JSONObject parsedJson = (JSONObject) new JSONParser().parse(json);
return Imposter.fromJSON(parsedJson);
}
}