Skip to content

Instantly share code, notes, and snippets.

@kofj
Created November 10, 2014 12:44
Show Gist options
  • Save kofj/3c1c39647b7fe29c6da7 to your computer and use it in GitHub Desktop.
Save kofj/3c1c39647b7fe29c6da7 to your computer and use it in GitHub Desktop.
解析json数据
{
"currTime": 1415617116876,
"result": "1",
"message": "",
"value": {
"UserID": "6e858035-083d-48b5-b822-74738e0d9434",
"UserName": "杨阳",
"MobilePhone": "18611645681",
"UserAccount": "18611645681",
"Province": "北京",
"City": "丰台区",
"Sex": "1",
"IDSID": "584b7781-7519-4f8e-91fb-e898e504bb1f",
"IdsName": "智信通演示专用(V5.1)",
"SeviceName": "",
"SeviceTel": "18611645681",
"customerFlag": "000",
"platformFlag": "ZXT",
"invitedCode": "RWZ",
"ModifyTime": 1415592178000,
"product": [
{
"SN": "18110515",
"snPwd": "18110515",
"IDC": "19110503937",
"CarTypeCode": "V",
"PlateNumber": "京N16Q96",
"LastServiceTime": "2014-11-10",
"MacAddress": "00:15:FF:F2:43:30",
"CarSerialName": "上海大众",
"SerialNumber": "110537",
"CarSerialID": "69912AAD-5992-490C-A9AD-ACAF16D20D8F",
"CarsModelID": "ae853982-3bce-4382-9296-fbc194ae6aaa",
"CarModelName": "新POLO",
"CarModelCode": "11",
"RegTime": 1415168103000,
"isSoundCard": 0,
"ProductName": "Tmt0N-Y05A智信通汽车远程体检系统",
"ProductCode": "F",
"isNewCar": 0,
"ModifyTime": 0,
"ERPdata": null,
"lastMileage": "5000.00",
"InsureDate": "",
"ProductId": "3b41064f-fc44-40c4-94b7-a27d10418f88",
"OrderTime": "",
"isClearCode": 1,
"isVoltageAlarm": 0,
"ProductModel": "C.Y.0005A",
"ServiceTel": null,
"isTTS": 0,
"isAccSensor": 0,
"engineNo": "",
"VIN": "",
"isGps": 0
},
{
"SN": "420003291",
"snPwd": "278953",
"IDC": "19420003291",
"CarTypeCode": "K",
"PlateNumber": "",
"LastServiceTime": "2014-11-10",
"MacAddress": "",
"CarSerialName": "北京现代",
"SerialNumber": "420003291",
"CarSerialID": "6D96C7FB-0DE2-4588-AFF3-299015E7D09A",
"CarsModelID": "04a20d34-6fe2-4af7-b46b-5caf8a2b65e7",
"CarModelName": "名图",
"CarModelCode": "13",
"RegTime": 1415587989000,
"isSoundCard": 0,
"ProductName": "Tmt0N-Y05D1W低脉冲 车联网系统V1.0",
"ProductCode": "W",
"isNewCar": 0,
"ModifyTime": 0,
"ERPdata": null,
"lastMileage": "",
"InsureDate": "",
"ProductId": "e01a1bef-37cf-4b73-920d-ab667d7aac41",
"OrderTime": "",
"isClearCode": 0,
"isVoltageAlarm": 0,
"ProductModel": "C.Y.0008E",
"ServiceTel": null,
"isTTS": 0,
"isAccSensor": 0,
"engineNo": "",
"VIN": "",
"isGps": 0
},
{
"SN": "40007499",
"snPwd": "585830",
"IDC": "19040007499",
"CarTypeCode": "V",
"PlateNumber": "",
"LastServiceTime": "2014-11-10",
"MacAddress": "00:15:FF:F3:A8:46",
"CarSerialName": "一汽-大众",
"SerialNumber": "040007499",
"CarSerialID": "15055F3D-57FD-4C87-A8AA-2173AF07C57A",
"CarsModelID": "8766dd1f-26d4-43ff-956a-68ee49ec92e2",
"CarModelName": "高尔夫6",
"CarModelCode": "8",
"RegTime": 1415591118000,
"isSoundCard": 1,
"ProductName": "Tmt0N-Y05A11WS智信通汽车远程体检系统",
"ProductCode": "X",
"isNewCar": 0,
"ModifyTime": 0,
"ERPdata": null,
"lastMileage": "",
"InsureDate": "",
"ProductId": "2994df09-45fe-45a9-8e6e-cd374a129b6b",
"OrderTime": "",
"isClearCode": 1,
"isVoltageAlarm": 0,
"ProductModel": "C.Y.0005D",
"ServiceTel": null,
"isTTS": 0,
"isAccSensor": 0,
"engineNo": "",
"VIN": "",
"isGps": 0
}
]
}
}
<?php
$res = file_get_contents("http://localhost/1.json");
$data = json_decode($res, true);
var_dump($data);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment