JSON array get length

后端 未结 7 950
长情又很酷
长情又很酷 2021-01-17 08:25

I can\'t get the array length of the JSON array. when I using length(); method it is not working, it show as red underline in Netbeans

this is the source code

7条回答
  •  被撕碎了的回忆
    2021-01-17 08:32

    The JSONArray.length() returns the number of elements in the JSONObject contained in the Array. Not the size of the array itself.

提交回复
热议问题