第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

將 JSON 字符串化為 PHP 對(duì)象

將 JSON 字符串化為 PHP 對(duì)象

PHP
慕慕森 2021-06-10 18:23:05
我有這個(gè) JSON 對(duì)象:{  "type": "FeatureCollection",  "features": [    {      "id": "0eb3d8a7d9afa466766e90b47f2bd785",      "type": "Feature",      "properties": {        "feature-description": "<div id=\"content\">html content here</div>"      },      "geometry": {        "coordinates": [          [            [              144.87452272951856,              -37.72702750630904            ],            [              145.00292543948336,              -37.78131678501029            ],            [              145.12926821291518,              -37.732458226660285            ],            [              145.11278872073137,              -37.70801684893612            ],            [              144.9184680420177,              -37.72431199679091            ],            [              144.87452272951856,              -37.72702750630904            ]          ]        ],        "type": "Polygon"      }    }  ]}如果我JSON.stringify嘗試在 PHP 中解碼:$jsonString = '"{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"id\": \"0eb3d8a7d9afa466766e90b47f2bd785\",\n      \"type\": \"Feature\",\n      \"properties\": {\n        \"feature-description\": \"<div id=\"content\">html content here</div>\"\n      },\n      \"geometry\": {\n        \"coordinates\": [\n          [\n            [\n              144.87452272951856,\n              -37.72702750630904\n            ],\n            [\n              145.00292543948336,\n              -37.78131678501029\n            ],\n            [\n              145.12926821291518,\n              -37.732458226660285\n            ],\n            [\n              145.11278872073137,\n              -37.70801684893612\n            ],\n            [\n              144.9184680420177,\n              -37.72431199679091\n            ],\n            [\n              144.87452272951856,\n              -37.72702750630904\n            ]\n          ]\n        ],\n        \"type\": \"Polygon\"\n      }\n    }\n  ]\n}"';我仍然得到一個(gè)string, 而不是object. 我究竟做錯(cuò)了什么?
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 198 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)