解析Json数组格式

例:["s1","s2","s3","s3","s4"]

List list =new ArrayList();
1、JSONArray
JSONArray jsonArray = new JSONArray(s);
for(int i = 0; i jsonList = gson.fromJson(s, new TypeToken>() {
}.getType());
list.addAll(jsonList);

你可能感兴趣的:(解析Json数组格式)