* @throws SparqlParseException When json string is not valid
* @throws SparqlEmptyException When json string is valid, but contains no results
*/
public void processResults(String jsonString) throws SparqlParseException, SparqlEmptyException {
if (jsonString == null || jsonString.length() == 0) {
throw new SparqlParseException("Unable to parse empty JSON string");
}
JSONValue jsonValue = JSONParser.parseStrict(jsonString);
//no need for this anymore, and it can be quite big. Fingers crossed and hope garbage collector deals witht this properly
jsonString = null;
if (jsonValue == null) {
throw new SparqlParseException("Unable to parse query json string");
}
JSONObject queryResult = jsonValue.isObject();
if (queryResult == null) throw new SparqlParseException("Unable to parse query json string");
if (queryMode == ResultType.Table) {
storeVariables(queryResult);
storeBindings(queryResult);
} else if (queryMode == ResultType.Boolean) {