{"type":"success","code":0,"message":null,"data":{"box_list":[{"boxId":"cfce938f2c7c11e69d5700000a00191c","boxNum":"nantong_test1","boxName":"我的保险柜","boxIp":"","boxMac":"","powerStatus":"0","networkStatus":"0","doorStatus":"2","shakeInfo":"1","deviceStatus":"1","boxStatus":"1","verifyStatus":"","lockPwd":"ABCD07033132333435363F030D","boxVersion":0,"channelId":"nantong_test1","boxControlPwd":"874d05d4bdd9077a7aefa0dc8c8cbd1f","adminUserId":"62f199be303b11e684c000000a00191c","boxPhone":"","defaultSkin":"0","netWorkName":"","agentId":"","createTime":null,"warninhCount":0,"batteryLevel":null,"temp":null},{"boxId":"73b1a2932c7211e69d5700000a00191c","boxNum":"lvlei6","boxName":"我的保险柜","boxIp":"","boxMac":"","powerStatus":"0","networkStatus":"0","doorStatus":"2","shakeInfo":"1","deviceStatus":"1","boxStatus":"1","verifyStatus":"","lockPwd":"ABCD07033132333435363F030D","boxVersion":30,"channelId":"lvlei6","boxControlPwd":"874d05d4bdd9077a7aefa0dc8c8cbd1f","adminUserId":"31f674062c8311e69d5700000a00191c","boxPhone":"","defaultSkin":"0","netWorkName":"","agentId":"","createTime":null,"warninhCount":0,"batteryLevel":null,"temp":null}],"user":{"id":"296d4ecc303d11e684c000000a00191c","userName":"kaka","loginName":"12@qq.com","loginPwd":"874d05d4bdd9077a7aefa0dc8c8cbd1f","userFinger1":"","userFinger2":"","userFinger3":"","type":"0","userPhone":"","userPhoto":"http://hissdata.blob.core.chinacloudapi.cn/userpicdata/296d4ecc303d11e684c000000a00191c_1465717285898.png","channelId":"","userListenDate":1465694992000,"boxNum":"","controlPwd":"","userNum":"","userAddress":"","userMail":"12@qq.com"}}}
没有问题的,你把解析后的数组打印出来核对一下
<?php$str = '{"type":"success","code":0,"message":null,"data":{"box_list":[ {"boxId":"cfce938f2c7c11e69d5700000a00191c","boxNum":"nantong_test1","boxName":"我的保险柜","boxIp":"","boxMac":"","powerStatus":"0","networkStatus":"0","doorStatus":"2","shakeInfo":"1","deviceStatus":"1","boxStatus":"1","verifyStatus":"","lockPwd":"ABCD07033132333435363F030D","boxVersion":0,"channelId":"nantong_test1","boxControlPwd":"874d05d4bdd9077a7aefa0dc8c8cbd1f","adminUserId":"62f199be303b11e684c000000a00191c","boxPhone":"","defaultSkin":"0","netWorkName":"","agentId":"","createTime":null,"warninhCount":0,"batteryLevel":null,"temp":null}, {"boxId":"73b1a2932c7211e69d5700000a00191c","boxNum":"lvlei6","boxName":"我的保险柜","boxIp":"","boxMac":"","powerStatus":"0","networkStatus":"0","doorStatus":"2","shakeInfo":"1","deviceStatus":"1","boxStatus":"1","verifyStatus":"","lockPwd":"ABCD07033132333435363F030D","boxVersion":30,"channelId":"lvlei6","boxControlPwd":"874d05d4bdd9077a7aefa0dc8c8cbd1f","adminUserId":"31f674062c8311e69d5700000a00191c","boxPhone":"","defaultSkin":"0","netWorkName":"","agentId":"","createTime":null,"warninhCount":0,"batteryLevel":null,"temp":null}],"user":{"id":"296d4ecc303d11e684c000000a00191c","userName":"kaka","loginName":"12@qq.com","loginPwd":"874d05d4bdd9077a7aefa0dc8c8cbd1f","userFinger1":"","userFinger2":"","userFinger3":"","type":"0","userPhone":"","userPhoto":"http://hissdata.blob.core.chinacloudapi.cn/userpicdata/296d4ecc303d11e684c000000a00191c_1465717285898.png","channelId":"","userListenDate":1465694992000,"boxNum":"","controlPwd":"","userNum":"","userAddress":"","userMail":"12@qq.com"}}}';$json = json_decode($str, true);echo $json['data']['box_list'][0]['boxId'], "\t", $json['data']['box_list'][1]['boxId'], "\n";
cfce938f2c7c11e69d5700000a00191c 73b1a2932c7211e69d5700000a00191c