qq_27665781 2016-03-18 08:01 采纳率: 100%
浏览 1425
已结题

Android 这Json应该怎么解析呢?【大家别嫌少,只有这点了】

是用的RestTemplate解析

图片说明

[
[
{
"id": 435224,
"calcTime": "2016-03-16 20:20:52.0",
"unit": null,
"deviceCode": {
"id": 32,
"devicename": "主机1"
},
"value": 0
},
{
"id": 435220,
"calcTime": "2016-03-16 20:15:52.0",
"unit": null,
"deviceCode": {
"id": 32,
"devicename": "主机1"
},
"value": 0
},
{
"id": 435216,
"calcTime": "2016-03-16 20:10:52.0",
"unit": null,
"deviceCode": {
"id": 32,
"devicename": "主机1"
},
"value": 0
},
{
"id": 435212,
"calcTime": "2016-03-16 20:05:52.0",
"unit": null,
"deviceCode": {
"id": 32,
"devicename": "主机1"
},
"value": 0
},
{
"id": 435208,
"calcTime": "2016-03-16 20:00:52.0",
"unit": null,
"deviceCode": {
"id": 32,
"devicename": "主机1"
},
"value": 0
}
],
[
{
"id": 435225,
"calcTime": "2016-03-16 20:20:52.0",
"unit": null,
"deviceCode": {
"id": 33,
"devicename": "主机2"
},
"value": 0
},
{
"id": 435221,
"calcTime": "2016-03-16 20:15:52.0",
"unit": null,
"deviceCode": {
"id": 33,
"devicename": "主机2"
},
"value": 0
},
{
"id": 435217,
"calcTime": "2016-03-16 20:10:52.0",
"unit": null,
"deviceCode": {
"id": 33,
"devicename": "主机2"
},
"value": 0
},
{
"id": 435213,
"calcTime": "2016-03-16 20:05:52.0",
"unit": null,
"deviceCode": {
"id": 33,
"devicename": "主机2"
},
"value": 0
},
{
"id": 435209,
"calcTime": "2016-03-16 20:00:52.0",
"unit": null,
"deviceCode": {
"id": 33,
"devicename": "主机2"
},
"value": 0
}
],
[
{
"id": 435226,
"calcTime": "2016-03-16 20:20:52.0",
"unit": null,
"deviceCode": {
"id": 34,
"devicename": "主机3"
},
"value": 0
},
{
"id": 435222,
"calcTime": "2016-03-16 20:15:52.0",
"unit": null,
"deviceCode": {
"id": 34,
"devicename": "主机3"
},
"value": 0
},
{
"id": 435218,
"calcTime": "2016-03-16 20:10:52.0",
"unit": null,
"deviceCode": {
"id": 34,
"devicename": "主机3"
},
"value": 0
},
{
"id": 435214,
"calcTime": "2016-03-16 20:05:52.0",
"unit": null,
"deviceCode": {
"id": 34,
"devicename": "主机3"
},
"value": 0
},
{
"id": 435210,
"calcTime": "2016-03-16 20:00:52.0",
"unit": null,
"deviceCode": {
"id": 34,
"devicename": "主机3"
},
"value": 0
}
],
[
{
"id": 435227,
"calcTime": "2016-03-16 20:20:52.0",
"unit": null,
"deviceCode": {
"id": 35,
"devicename": "主机4"
},
"value": 0
},
{
"id": 435223,
"calcTime": "2016-03-16 20:15:52.0",
"unit": null,
"deviceCode": {
"id": 35,
"devicename": "主机4"
},
"value": 0
},
{
"id": 435219,
"calcTime": "2016-03-16 20:10:52.0",
"unit": null,
"deviceCode": {
"id": 35,
"devicename": "主机4"
},
"value": 0
},
{
"id": 435215,
"calcTime": "2016-03-16 20:05:52.0",
"unit": null,
"deviceCode": {
"id": 35,
"devicename": "主机4"
},
"value": 0
},
{
"id": 435211,
"calcTime": "2016-03-16 20:00:52.0",
"unit": null,
"deviceCode": {
"id": 35,
"devicename": "主机4"
},
"value": 0
}
]
]

  • 写回答

9条回答

  • 一口仨馍 博客专家认证 2016-03-18 08:06
    关注

    去掉最外层[]之后是个JSONArray,之后正常解析

    评论

报告相同问题?

悬赏问题

  • ¥15 C# datagridview 栏位进度
  • ¥15 vue3页面el-table页面数据过多
  • ¥100 vue3中融入gRPC-web
  • ¥15 kali环境运行volatility分析android内存文件,缺profile
  • ¥15 写uniapp时遇到的问题
  • ¥15 vs 2008 安装遇到问题
  • ¥15 matlab有限元法求解梁带有若干弹簧质量系统的固有频率
  • ¥15 找一个网络防御专家,外包的
  • ¥100 能不能让两张不同的图片md5值一样,(有尝)
  • ¥15 informer代码训练自己的数据集,改参数怎么改