这是我使用PHP
从json文件中读取的单个JSON ELEMENT的示例{
"Air Elemental":{
"layout":"normal",
"name":"Air Elemental",
"manaCost":"{3}{U}{U}",
"cmc":5,
"colors":[
"Blue"
],
"type":"Creature — Elemental",
"types":[
"Creature"
],
"subtypes":[
"Elemental"
],
"text":"Flying",
"power":"4",
"toughness":"4",
"imageName":"air elemental"
}
这是同一JSON ITEM的PHP输出(var_dump)
public 'type' => string 'Creature — Elemental' (length=22)
正如您所见,( - )变为( - )。
我如何解决这个编码问题? (读完json后我把数据写在DB上)