-4
如何JSON密钥转换在PHP小写,如何转换JSON关键小写在PHP
例如:
"Object" : {
"objectType" : "Activity",
"id" : "http://activitystrea.ms/schema/1.0/page",
"Definition" : {
"name" : {
"en-US" : "What Is Information Security?"
},
"Description" : {
"en-US" : ""
}
}
}
以上数据应该是这样的:
"object" : {
"objecttype" : "Activity",
"id" : "http://activitystrea.ms/schema/1.0/page",
"definition" : {
"name" : {
"en-us" : "What Is Information Security?"
},
"description" : {
"en-us" : ""
}
}
}
嗯,也许只是使用小写名称来生成该JSON? –
这会帮助你http://php.net/manual/en/function.array-change-key-case.php –