json代码如下:
{"data":[ {"data": {"created":"2014-02-26T21:14:56.662Z", "district":"4fd43cc56d11340000000005", "high_grade":"12", "last_modified":"2014-02-26T21:14:56.665Z", "location":{"address":"350 5th Avenue","city":"New York","state":"NY","zip":"10001"}, "low_grade":"9", "name":"Clever High School", "nces_id":"360008000000", "phone":"(212) 555-1212", "principal":{"name":"TheodoraKhan","email":"tdkhan@mailinator.com"}, "school_number":"02M800", "sis_id":"02M800", "state_id":"712345","id":"530e595026403103360ff9fd"}, "uri":"/v1.1/schools/530e595026403103360ff9fd"}, {"data":{"created":"2014-02-26T21:14:56.668Z","district":"4fd43cc56d11340000000005","high_grade":"5","last_modified":"2014-02-26T21:14:56.670Z","location":{"address":"110
菠萝 街""城市":"布鲁克林""状态":" NY""拉链&#34 ;: " 11201"}" low_grade":"幼儿园""名称":"聪明 小学"," nces_id":" 360007000000","电话":"(718) 555-4567""主" {"名称":"塞西莉亚 罗德里克""电子邮件":" ceciliar@mailinator.com"}" school_number":" 13K123"" sis_id":" 13K123"" STATE_ID":" 30890"" ID":" 530e595026403103360ff9fe"} " URI":" /v1.1/schools/530e595026403103360ff9fe"}
答案 0 :(得分:0)
我不太明白你在问什么。
但您可以使用以下内容:
$obj = json_decode($json_str);
答案 1 :(得分:0)
尝试json_decode
:
$data = {"data":"a"}:
$json = json_decode($data);
echo $json->data;