JSON 構造の形式が正しくありません。2番目の配列の後に「]」がありません。修正後はこうなります…
[
[
"1",
"user",
"test"
],
[
"2",
"another",
"test"
],
[
"3",
"last one",
"test"
]
]
編集 :
おそらく解析方法が正しくありません。あなたの文字列は、別の 3 つの JSONArrays がある JSONArray です。したがって、解析は次のようになります
String str = "your json string above" ;
try {
JSONArray array = new JSONArray(str);
for(int i = 0 ; i < array.length() ; i++){
JSONArray nestedArray = array.getJSONArray(i);
for(int j = 0 ; j < nestedArray.length() ; j++){
System.out.println("" + nestedArray.getString(j) + "\n");
}
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}