106107108109110111112113114115116
if (query != null) { List<Object> res = new ArrayList<Object>(); while (query.hasNext()) { res.add(query.next()); } ObjectMapper mapper = new ObjectMapperImpl(); result = mapper.toJson(res); } return new Result("boon", time, result, error); } }