public HashMap delParseJson(String path) { String jsonstr = entity.deleteInfo(path); HashMap map = new HashMap(); try { map = new JSONDeserializer<HashMap>().deserialize(jsonstr); } catch (Exception e) { System.out.println(e + ": " + jsonstr); } return map; }
public ArrayList<HashMap> parseJsonArray(String path) { String jsonstr = entity.getInfo(path); ArrayList<HashMap> map = new ArrayList<HashMap>(); try { map = new JSONDeserializer<ArrayList<HashMap>>().deserialize(jsonstr); } catch (Exception e) { System.out.println(e + ": " + jsonstr); } return map; }
public String getSites(BuildListener listener) { String sitesstr = entity.getSite(); String sites = new String(); try { sites = new JSONDeserializer<ArrayList<String>>().deserialize(sitesstr).get(0).toString(); } catch (Exception e) { sites = "failure"; listener.getLogger().println(sites); } return sites; }
public void close() { entity.close(); }