Skip to content

Commit

Permalink
more convenient JSON structure
Browse files Browse the repository at this point in the history
  • Loading branch information
baltzell committed Dec 29, 2024
1 parent 0273077 commit 0d81cf6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,16 @@ public String toTable() {
* @return
*/
public JsonObject toJson() {
JsonObject ret = new JsonObject();
JsonObject effs = new JsonObject();
JsonArray pids = new JsonArray();
JsonArray effs = new JsonArray();
for (int i=0; i<PIDS.size(); ++i) {
pids.add(PIDS.get(i));
JsonArray a = new JsonArray();
for (int j=0; j<PIDS.size(); ++j)
a.add(get(PIDS.get(i),PIDS.get(j)));
effs.add(a);
effs.add(Integer.toString(PIDS.get(i)),a);
}
JsonObject ret = new JsonObject();
ret.add("pids", pids);
ret.add("effs", effs);
return ret;
Expand Down

0 comments on commit 0d81cf6

Please sign in to comment.