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,之后正常解析

    评论

报告相同问题?

悬赏问题

  • ¥50 NT4.0系统 STOP:0X0000007B
  • ¥15 想问一下stata17中这段代码哪里有问题呀
  • ¥15 flink cdc无法实时同步mysql数据
  • ¥100 有人会搭建GPT-J-6B框架吗?有偿
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。