@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (Map.Entry<ModelASTKey, ModelASTValue> entry: arguments.entrySet()) { JSONObject o = new JSONObject(); o.accumulate("key", entry.getKey().toJSON()); o.accumulate("value", entry.getValue().toJSON()); a.add(o); } return a; }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (Map.Entry<ModelASTKey, ModelASTMethodArg> entry: variables.entrySet()) { JSONObject o = new JSONObject(); o.accumulate("key", entry.getKey().toJSON()); o.accumulate("value", entry.getValue().toJSON()); a.add(o); } return a; }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (Map.Entry<ModelASTKey, ModelASTValue> entry: tools.entrySet()) { JSONObject o = new JSONObject(); o.accumulate("key", entry.getKey().toJSON()); o.accumulate("value", entry.getValue().toJSON()); a.add(o); } return a; }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (Map.Entry<ModelASTKey, ModelASTEnvironmentValue> entry: variables.entrySet()) { JSONObject o = new JSONObject(); o.accumulate("key", entry.getKey().toJSON()); o.accumulate("value", entry.getValue().toJSON()); a.add(o); } return a; }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (Map.Entry<ModelASTKey, ModelASTValue> entry: tools.entrySet()) { JSONObject o = new JSONObject(); o.accumulate("key", entry.getKey().toJSON()); o.accumulate("value", entry.getValue().toJSON()); a.add(o); } return a; }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (Map.Entry<ModelASTKey, ModelASTEnvironmentValue> entry: variables.entrySet()) { JSONObject o = new JSONObject(); o.accumulate("key", entry.getKey().toJSON()); o.accumulate("value", entry.getValue().toJSON()); a.add(o); } return a; }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (Map.Entry<ModelASTKey, ModelASTValue> entry: arguments.entrySet()) { JSONObject o = new JSONObject(); o.accumulate("key", entry.getKey().toJSON()); o.accumulate("value", entry.getValue().toJSON()); a.add(o); } return a; }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (Map.Entry<ModelASTKey, ModelASTMethodArg> entry: variables.entrySet()) { JSONObject o = new JSONObject(); o.accumulate("key", entry.getKey().toJSON()); o.accumulate("value", entry.getValue().toJSON()); a.add(o); } return a; }
@Override public JSONObject toJSON() { return new JSONObject().accumulate("key", key.toJSON()).accumulate("value", value.toJSON()); }
@Override public JSONObject toJSON() { return new JSONObject().accumulate("key", key.toJSON()).accumulate("value", value.toJSON()); }
@Override public JSONObject toJSON() { final JSONObject j = new JSONObject(); j.accumulate("type", agentType.toJSON()); if (variables != null) { if (variables instanceof ModelASTClosureMap && !((ModelASTClosureMap) variables).getVariables().isEmpty()) { j.accumulate("arguments", variables.toJSON()); } else if (variables instanceof ModelASTValue) { j.accumulate("argument", variables.toJSON()); } } return j; }
@Override public JSONObject toJSON() { final JSONObject j = new JSONObject(); // Handle JENKINS-43016 - round-trip empty-string label agent into agent any. if (isEmptyStringLabelAgent()) { j.accumulate("type", "any"); } else { j.accumulate("type", agentType.toJSON()); if (variables != null) { if (variables instanceof ModelASTClosureMap && !((ModelASTClosureMap) variables).getVariables().isEmpty()) { j.accumulate("arguments", variables.toJSON()); } else if (variables instanceof ModelASTValue) { j.accumulate("argument", variables.toJSON()); } } } return j; }