我试图将我的JSON结果分解为新行,但发现很难做到。
例如,{"id":"1","student_id":"5013","subject1":"87","subject2":"87","subject3":"56","subject4":"76","subject5":"68","subject6":"58","subject7":"98","subject8":"67","subject9":"88"}
到
id : 1
student_id : 5013
subject1 : 87
subject2 : 87
...
我尝试使用
String[] stringsArray = new String[jArray.length()];
for (int i = 0; i < jArray.length(); i++) {
System.out.println(stringsArray[i] = jObj.getString(i) + "\n");
}
但仍然给出相同的结果。 感谢。