json解码翻译Json的问题

时间:2014-07-10 14:56:10

标签: php json

我正在尝试转换或使用json_decode:

{
"rc": 0,
"msg": "Exitoso",
"className": "ve.com.icg.commons.to.ActivityTransfer",
"bean": "{\"memberEnrollmentList\":{\"enrolles\":    [{\"code\":\"000400\",\"companyCode\":\"18\",\"groupCode\":\"00\",\"documentId\":\"V00000232566\",\"licenseNumber\":\"00000400\",\"name\":\"BENAIM PINTO (ZL) GONZALO\",\"dateOfBirth\":\"21-APR-27\",\"maritalStatus\":\"CAS\",\"dateOfLicenseIssuance\":\"27-JUL-95\",\"dateOfLicenseExpiration\":\"30-APR-00\",\"commercialName\":\"LA ESTIC VENEZUELA\",\"codeClient\":\"00-000400\",\"gender\":\"M\",\"activitysList\":{\"activitys\":[]}},{\"code\":\"000410\",\"companyCode\":\"18\",\"groupCode\":\"11\",\"documentId\":\"V00010289740\",\"licenseNumber\":\"11000410\",\"name\":\"COHEN DE ESTRIN NANCY\",\"dateOfBirth\":\"10-MAY-70\",\"maritalStatus\":\"CAS\",\"dateOfAdmission\":\"13-DEC-02\",\"dateOfLicenseIssuance\":\"24-SEP-10\",\"dateOfLicenseExpiration\":\"30-MAY-15\",\"codeClient\":\"11-000410\",\"gender\":\"F\",\"relationshipCode\":\"E10\",\"relationship\":\"ESPOSO (A)\",\"activitysList\":{\"activitys\":[{\"code\":\"GIMNASIO-MENSUA\",\"description\":\"GIMNASIO PLAN MENSUAL\",\"sectionsList\":{\"sections\":[{\"code\":\"MENSU\",\"openings\":0,\"description\":\"GIMNASIO PLAN MENSUAL\"}]}}]}},{\"code\":\"000410\",\"companyCode\":\"18\",\"groupCode\":\"00\",\"documentId\":\"V00000960057\",\"licenseNumber\":\"00000410\",\"name\":\"ABADI DE BENAIM JUDITH\",\"dateOfBirth\":\"23-MAY-32\",\"maritalStatus\":\"VIU\",\"dateOfLicenseIssuance\":\"29-FEB-08\",\"dateOfLicenseExpiration\":\"30-MAY-13\",\"codeClient\":\"00-000410\",\"gender\":\"F\",\"relationshipCode\":\"E10\",\"relationship\":\"ESPOSO (A)\",\"activitysList\":{\"activitys\":[{\"code\":\"EVENADUL-ENSATU\",\"description\":\"ENSALADAS PARA TU BISHVAT \\\"MARISOL BENDAYAN\\\" (07/02/2012)\",\"sectionsList\":{\"sections\":[{\"code\":\"1\",\"openings\":0,\"description\":\"ENSALADAS PARA TU BISHVAT\"}]}}]}},{\"code\":\"000412\",\"companyCode\":\"18\",\"groupCode\":\"11\",\"documentId\":\"E00000786622\",\"licenseNumber\":\"11000412\",\"name\":\"SHIRLEY DOUEK DE COHEN\",\"dateOfBirth\":\"17-NOV-38\",\"maritalStatus\":\"CAS\",\"dateOfAdmission\":\"12-DEC-02\",\"dateOfLicenseIssuance\":\"29-JUL-07\",\"dateOfLicenseExpiration\":\"30-NOV-12\",\"codeClient\":\"11-000412\",\"gender\":\"F\",\"relationshipCode\":\"S12\",\"relationship\":\"SUEGRA\",\"activitysList\":{\"activitys\":[{\"code\":\"DEPORTES-GIMNAS\",\"description\":\"GIMNASIA ARTISTICA ESCUELAS DEPORTIVAS Y DEPORTE FEDERADO\",\"sectionsList\":{\"sections\":[{\"code\":\"GIMN10\",\"openings\":0,\"description\":\"MEJJORAMIENTO FISICO 4\"}]}}]}},{\"code\":\"000420\",\"companyCode\":\"18\",\"groupCode\":\"11\",\"licenseNumber\":\"11000420\",\"name\":\"ESTRIN COHEN SHARON\",\"dateOfBirth\":\"29-SEP-98\",\"maritalStatus\":\"SIN\",\"codeClient\":\"11-000420\",\"gender\":\"F\",\"relationshipCode\":\"H01\",\"relationship\":\"HIJO 1\",\"activitysList\":{\"activitys\":[]}},{\"code\":\"000430\",\"companyCode\":\"18\",\"groupCode\":\"11\",\"licenseNumber\":\"11000430\",\"name\":\"ESTRIN COHEN SHIRLEY\",\"dateOfBirth\":\"02-SEP-99\",\"maritalStatus\":\"SIN\",\"codeClient\":\"11-000430\",\"gender\":\"F\",\"relationshipCode\":\"H02\",\"relationship\":\"HIJO 2\",\"activitysList\":{\"activitys\":[{\"code\":\"BAILES-BADULT\",\"description\":\"BAILES ISRAELIES ADOLESCENTES\",\"sectionsList\":{\"sections\":[{\"code\":\"02\",\"openings\":0,\"description\":\"SEGUNDO AÑO\"}]}},{\"code\":\"DEPORTES-GIMNAS\",\"description\":\"GIMNASIA ARTISTICA ESCUELAS DEPORTIVAS Y DEPORTE FEDERADO\",\"sectionsList\":{\"sections\":[{\"code\":\"GIMN10\",\"openings\":0,\"description\":\"MEJJORAMIENTO FISICO 4\"}]}}]}}]}}",
"accessLog": {
    "sessionId": "0cd4ceec6d753af545d3bfc0939a0759",
    "userName": "DGAMBOA",
    "RC": 0
},
"token": "0cd4ceec6d753af545d3bfc0939a0759"
}

但是响应是空的,我怎么解决这个问题?

我将这个Json存储在txt文件中并调用..

$textJson= file_get_contents('JSON2.txt'); 
$arrJson = json_decode($textJson,true);

1 个答案:

答案 0 :(得分:1)

这一行是你的问题:

\"description\":\"ENSALADAS PARA TU BISHVAT \\\"MARISOL BENDAYAN\\\" (07/02/2012)\"