Skip to content

Commit

Permalink
allow json array
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Aug 3, 2018
1 parent 0ee8dee commit a8164f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/jsonrpc/JsonProcessRunner.java
Expand Up @@ -2,6 +2,7 @@

import net.minidev.json.parser.JSONParser;
import net.minidev.json.JSONObject;
import net.minidev.json.JSONArray;
import duckutil.ProcessRunner;
import java.util.Collection;

Expand All @@ -20,5 +21,13 @@ public JSONObject getJsonOutput()
JSONObject json = (JSONObject)parser.parse(getOutput().trim());
return json;
}

public JSONArray getJsonArray()
throws Exception
{
JSONParser parser = new JSONParser(JSONParser.MODE_STRICTEST);
JSONArray json = (JSONArray)parser.parse(getOutput().trim());
return json;
}
}

0 comments on commit a8164f2

Please sign in to comment.