dpmpa26468 2016-11-29 12:23
浏览 453

迭代具有多级嵌套对象和数组的JSON数据

i have being trying to parse through a JSON data in android and am looking for a code that can take the values out.JSON data structure is as shown below:

{
    "p":
        [
            {"t1":
                [
                    {
                        "key":"value", "key1":"value1"
                    },
                    {
                        "key":"value2","key1":"value3"
                    }
                ],
             "t2":
                [
                    {
                        "key":"value", "key1":"value1"
                    },
                    {
                        "key":"value2","key1":"value3"
                    }
                ],........
            }
        ]
}

that is my JSON data that i want to parse in android and the function that parses that data should return an array of all the values in in t1,t2 onwards but the array should not be an array of nested arrays or a nested array. please help.

  • 写回答

2条回答

  • dqhgjay5753 2016-11-29 12:38
    关注

    put your json in ,jsontopojo! it will generate model classes for you

    评论

报告相同问题?

悬赏问题

  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题