use of org.sonar.wsclient.jsonsimple.parser.JSONParser in project sonarqube by SonarSource.
the class WsCallAndWait method toJsonObject.
private JSONObject toJsonObject(String s) {
try {
JSONParser parser = new JSONParser();
Object o = parser.parse(s);
if (o instanceof JSONObject) {
return (JSONObject) o;
}
throw new RuntimeException("Can not parse response from server migration WS (not a JSON object)");
} catch (Exception e) {
throw new IllegalStateException("Invalid JSON: " + s, e);
}
}
Aggregations