我有这个JSON文件
{
1 : {
name: "John Doe",
birthYear: "1990",
reqion: "USA"
phone: "604789577",
},
2 : {
name: "Jose Dirack",
birthYear: "1970",
reqion: "Europe"
phone: "768789577",
}
}
json_decode()
无法对其进行解码。
你明白为什么吗?您知道如何解决它吗?
答案 0 :(得分:3)
{
"1" : {
"name": "John Doe",
"birthYear": "1990",
"reqion": "USA",
"phone": "604789577"
},
"2" : {
"name": "Jose Dirack",
"birthYear": "1970",
"reqion": "Europe",
"phone": "768789577"
}
}
还有一个拼写错误的拼写错误。
答案 1 :(得分:1)
答案 2 :(得分:0)
试试这个:
[
{
"name": "John Doe",
"birthYear": "1990",
"reqion": "USA",
"phone": "604789577"
},
{
"name": "Jose Dirack",
"birthYear": "1970",
"reqion": "Europe",
"phone": "768789577"
}
]