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 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突