0

Parsing JSON then adding multiple strings to an ArrayList

view story
linux-howto

http://stackoverflow.com – Currently working on an app that takes results from a search, parses the JSON object returned, and then adds the resulting pieces into a few ArrayLists within a class created called VenueList. Here is the method that receives the results from the service and parses the JSON: private static List<String> getResultsFromJson(String json) { ArrayList<String> resultList = new ArrayList<String>(); try { JSONObject resultsWrapper = (JSONObject) new JSONTokener(json).nextValue(); JSONArray results = resultsWrapper.getJSONArray("results"); (HowTos)