如何从此数组列表中获取值到字符串。我现在需要知道这一点才能使用我的程序。
JSONFunctions a=new JSONFunctions();
jsonarray= a.getJSONfromURL(URL);
ArrayList<HashMap<String, String>> arraylist = new ArrayList<HashMap<String, String>>();
JSONFunctions a=new JSONFunctions();
jsonarray= a.getJSONfromURL(URL);
try
{
for (int i = 0; i < jsonarray.length(); i++)
{
HashMap<String, String> map = new HashMap<String, String>();
JSONObject js=jsonarray.getJSONObject(i);
map.put("artid",js.getString("artid"));
map.put("arttitle",js.getString("arttitle"));
map.put("artdescription",js.getString("artdescrption"));
map.put("artimage", js.getString("artimage"));
map.put("artdate",js.getString("artdate"));
arraylist.add(map);
}
}
catch (JSONException e)
{
Log.e("Error", e.getMessage());
e.printStackTrace();
}