@Override public Object toJSON() { return value.toJSON(); }
@Override public Object toJSON() { return value.toJSON(); }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (ModelASTValue argument: arguments) { a.add(argument.toJSON()); } return a; }
@Override public JSONArray toJSON() { final JSONArray a = new JSONArray(); for (ModelASTValue argument: arguments) { a.add(argument.toJSON()); } 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, 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, 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, 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 JSONObject toJSON() { final JSONObject o = new JSONObject(); o.accumulate("message", message.toJSON()); if (id != null) { o.accumulate("id", id.toJSON()); } if (ok != null) { o.accumulate("ok", ok.toJSON()); } if (submitter != null) { o.accumulate("submitter", submitter.toJSON()); } if (submitterParameter != null) { o.accumulate("submitterParameter", submitterParameter.toJSON()); } if (!parameters.isEmpty()) { final JSONObject p = new JSONObject(); final JSONArray a = new JSONArray(); for (ModelASTBuildParameter parameter : parameters) { a.add(parameter.toJSON()); } // Redundancy due to how we parse parameters in JSON. This makes top-level and input parameters JSON consistent. p.accumulate("parameters", a); o.accumulate("parameters", p); } return o; }
@Override public JSONObject toJSON() { final JSONArray a = new JSONArray(); for (ModelASTValue v : libs) { a.add(v.toJSON()); } return new JSONObject().accumulate("libraries", a); }
@Override public JSONObject toJSON() { final JSONArray a = new JSONArray(); for (ModelASTValue v : libs) { a.add(v.toJSON()); } return new JSONObject().accumulate("libraries", a); }
@Override public JSONObject toJSON() { final JSONArray a = new JSONArray(); for (ModelASTValue arg: args) { a.add(arg.toJSON()); } return new JSONObject().accumulate("name", name).accumulate("arguments", a); }
@Override public JSONObject toJSON() { final JSONArray a = new JSONArray(); for (ModelASTValue arg: args) { a.add(arg.toJSON()); } return new JSONObject().accumulate("name", name).accumulate("arguments", a); }