{
"highestEducationQualification": "graduate",
"company": "ABB LIMITED",
"sbiDesignation": "ASSISTANT DIRECTOR",
"availedSbiCard": "yes",
"sbiAppliedPastSixMonths": "no",
"availedCC": "yes",
"sbiAssociateBanks": "no",
"userAccountNumber": "9876545678",
"residenceAddress": "{"doorNo":"12","addressLine1":"dfffsfsf","addressLine2":"wrwrw","pincode":"600017","city":"Chennai","state":"Tamil Nadu"}",
"officeAddress": "{"doorNo":"2323","addressLine1":"sdsdsdsd","addressLine2":"sdfds","pincode":"600017","city":"Chennai","state":"Tamil Nadu"}"
}
答案 0 :(得分:0)
它不完全是json格式。你应该在使用之前转换它(使用你的语言中的任何str_replace()
函数):
"{"
转换为{"
"}"
转换为"}
你在数组中有错误。
错误
"residenceAddress": "{"doorNo":" .....
更正
"residenceAddress": {"doorNo":" .....
现在您可以使用json_decode()
。
答案 1 :(得分:0)
试试这个
<?php
$test = '{"highestEducationQualification": "graduate","company": "ABB LIMITED","sbiDesignation": "ASSISTANT DIRECTOR","availedSbiCard":"yes","sbiAppliedPastSixMonths":"no","availedCC":"yes","sbiAssociateBanks":"no","userAccountNumber":"9876545678","residenceAddress":{"doorNo":"12","addressLine1":"dfffsfsf","addressLine2":"wrwrw","pincode":"600017","city":"Chennai","state":"Tamil Nadu"},"officeAddress":{"doorNo":"2323","addressLine1":"sdsdsdsd","addressLine2":"sdfds","pincode":"600017","city":"Chennai","state":"Tamil Nadu"}}';
print_r(json_decode($test, true));
?>
工作小提琴