android中的无名称json解析

android中的无名称json解析,android,json,Android,Json,我以前使用过json名称-值对,效果很好,但下面是我的json对象,其中没有名称,只有值。有人能告诉我们在android中是否可以使用这种类型的json吗?如果可以,那么如何从这个json对象中提取值。或者任何相关链接都会很好 JSON对象 { "log_list": [ [ "21", "doctorFisher", "Pharmacy 1", "patientfish",

我以前使用过json名称-值对,效果很好,但下面是我的json对象,其中没有名称,只有值。有人能告诉我们在android中是否可以使用这种类型的json吗?如果可以,那么如何从这个json对象中提取值。或者任何相关链接都会很好

JSON对象

{
    "log_list": [
        [
            "21",
            "doctorFisher",
            "Pharmacy 1",
            "patientfish",
            "test",
            "2014-08-25 05:58:18",
            "record UCI tech FDNY icky shut rack soon sun TDK tell. ox it'll ohm URL did GCVO dash ugly dog did flood idiot fluff if if rid t-shirts didn't TechTV only chef doc scotch Rebekah an if lb tax scotch am ICN JCB JCB HGV JCB HGV in on pm tax UDC OK red uh HK ohm",
            "<img id=\"prescription_image\" onClick=showPrescriptionDetails(\"3c59dc048e8850243be8079a5c74d079\") onmouseover=\"this.style.cursor='pointer'\" src=\"\" width=\"20\" height=\"20\">"
        ],
        [
            "20",
            "doctortest12345",
            "Pharmacy 1",
            "testpatient12345",
            "test",
            "2014-08-25 03:57:32",
            "she'd Urdu text scuff uno dad uno each ink why tough days ICO saved USCIS David rig though end FDIC UCI's for USCIS tend did for dog such vidi fly floor exited did DND hand bid GMD.",
            "<img id=\"prescription_image\" onClick=showPrescriptionDetails(\"98f13708210194c475687be6106a3b84\") onmouseover=\"this.style.cursor='pointer'\"  width=\"20\" height=\"20\">"
        ]
}  
{
“日志列表”:[
[
"21",
“费舍尔博士”,
“药剂业1”,
“耐心鱼”,
“测试”,
"2014-08-25 05:58:18",
“录制UCI tech FDNY icky CLOSK rack sun TDK tell.ox it'll ohm URL GCVO dash丑陋的狗没有泛滥的白痴绒毛如果rid t恤没有TechTV只有厨师doc scotch Rebekah an如果lb tax scotch am ICN JCB JCB HGV JCB HGV在pm tax UDC OK red uh HK ohm”,
""
],
[
"20",
“博士12345”,
“药剂业1”,
“testpatient12345”,
“测试”,
"2014-08-25 03:57:32",
“她用乌尔都语发短信抹去乌诺爸爸乌诺的每一个墨水为什么艰难的日子ICO救了USCIS David rig,尽管FDIC UCI为USCIS tend为狗做了,比如vidi飞行地板退出了DND手工出价GMD。”,
""
]
}  

提前感谢

是的,这种格式可以工作,您可以非常轻松地使用它

假设您有一个包含该数据的变量
字符串json

JSONObject jsonObj = new JSONObject(json);
现在
log\u list
将被解析为
JSONArray
如下:

JSONArray logJsonArray = jsonObj.getJSONArray("log_list");
然后,您可以通过与普通数组或ArrayList非常相似的方式遍历该外部数组:

for(int outerArrayPos = 0; outerArrayPos < logJsonArray.length(); outerArrayPos++){
    JSONArray innerArray = logJsonArray.getJSONArray(outerArrayPos);

    for(int innerArrayPos = 0; innerArrayPos < innerArray.length(); innerArrayPos++){
       String valueAtIndex = innerArray.getString(innerArrayPos); //innerArray

       // Do whatever you want with the values here
    }
}

它们被称为“数组”。你可以自己找到其余的。好的,知道了……非常感谢
{
    "log_list": [
        {
            "id": "21",
            "name": "doctorFisher",
            .....
         }
     ]
 }