Convert one JSONAray item into multiple Items

后端 未结 2 1048
谎友^
谎友^ 2021-01-22 07:55

I have the following String which is returning from the Database in the form of List, My assumption is that, the list contains 3 items. but it is showing only \"1\" as the size.

2条回答
  •  抹茶落季
    2021-01-22 08:15

    You have to use GSON library to parse this JSON array. You need to do something similar to below code.

        JSONArray jsonArray = new JSONArray(jsonArrayString);
        List list = new ArrayList();
        for (int i=0; i

提交回复
热议问题