}
String jsonRule = httpRequestFactory.get("/api/rules/show", params);
try{
JsonElement jsonElement = new JsonParser().parse(new StringReader(jsonRule));
JsonObject rule = (JsonObject) ((JsonObject)jsonElement).get("rule");
Rule rule1 = new Rule();
rule1.setKey(rule.get("key").getAsString());
rule1.setTitle(rule.get("name").getAsString());
rule1.setDescription(rule.get("htmlDesc").getAsString());
return rule1;
}catch(JsonSyntaxException ex) {
return null;
}
}