コード例 #1
0
 private void writeActiveRule(ActiveRule activeRule, JsonWriter json) {
   json.beginObject()
       .prop("qProfile", activeRule.key().qProfile().toString())
       .prop("inherit", activeRule.inheritance().toString())
       .prop("severity", activeRule.severity());
   ActiveRuleKey parentKey = activeRule.parentKey();
   if (parentKey != null) {
     json.prop("parent", parentKey.toString());
   }
   json.name("params").beginArray();
   for (Map.Entry<String, String> param : activeRule.params().entrySet()) {
     json.beginObject().prop("key", param.getKey()).prop("value", param.getValue()).endObject();
   }
   json.endArray().endObject();
 }