JSONArray to string array
将json数组转换为字符串[]看起来太多的沸腾板。有没有更简单,更优雅的方法?
final JSONArray keyArray = input.getJSONArray("key");
String[] keyAttributes = new String[keyArray.length()];
for(int i = 0; i < keyArray.length(); i++) {
keyAttributes[i] = keyArray.getString(i);
}