json android 中的未终止对象字符



我尝试从 JSON 中替换转义序列和特殊字符,但似乎没有任何效果,

String reString=stringresponce.replaceAll("<", "").replaceAll("!", "").replaceAll("-", "").replaceAll("/", "").replaceAll(">", "").replaceAll("#", "").replaceAll("/r", "").replaceAll("/n", "").replaceAll("/r/n", "").replaceAll("/r/n", "");

  org.json.JSONException: Unterminated object at character 325 of 
[{"business_id":17,"business_name":"SOMALI EDUCATION RESOURCE CENTER","business_address":"4337 Cleveland Avenue, Columbus, OH 43224, USA","business_google_long":"82.95385742","business_google_lat":"40.05750275","contact_no":"614 525 9083","contact_no2":null,"contact_no3":null,"business_website":"http:\www.serc360.com","sub_category_id":"25","category_id":"12","date_created":"20141127 14:24:45","business_description":"The mission of the Somali Education and Resource Center is to provide skills and literacy by expanding the knowledge of immigrants and refugees by teaching them the financial social and cultural skills that provide a foundation to attain selfsufficiency. We also offer the following services.rnrnFamily LiteracyrnAfterSchool Program ActivitiesrnYouth TrainingrnFinancial Literacy","subscriber_id":"23","images":[{"image_name":"bi1417123343010serc1.png"},{"image_name":"bi1417123433298serc4.jpg"},{"image_name":"bi1417123485124serc2.JPG"}],"rating":"4","reviews":[],"business_hours":[{"bh_day":"Saturday","bh_start":"09:00 AM","bh_end":"5:00 PM"},{"bh_day":"Sunday","bh_start":"09:00 AM","bh_end":"5:00 PM"},{"bh_day":"Monday","bh_start":"09:00 AM","bh_end":"5:00 PM"},{"bh_day":"Tuesday","bh_start":"09:00 AM","bh_end":"5:00 PM"},{"bh_day":"Wednesday","bh_start":"09:00 AM","bh_end":"5:00 PM"},{"bh_day":"Thursday","bh_start":"09:00 AM","bh_end":"5:00 PM"},{"bh_day":"Friday","bh_start":"09:00 AM","bh_end":"5:00 PM"}],"prayerTimings":[]},{"business_id":18,"business_name":"SOMALI COMMUNITY RESETTLEMENT SERVICES INC","business_address":"2593 South Ferris Park Drive, Columbus, OH 43224, USA","business_google_long":"82.95046997","business_google_lat":"40.08499146","contact_no":" (507) 7210641","contact_no2":null,"contact_no3":null,"business_website":"http:\somalcrs.wix.comscrs","sub_category_id":"25","category_id":"12","date_created":"20141127 14:37:02","business_description":"SCRS Missionrn rnTo promote and advance the social well being and the welfare of its members by providing muchneeded community and resettlement services with ultimate goal of building vibrant community whose members can successfully settle and effectively integrate into the wider American Community. ","subscriber_id":"24","images":[],"rating":"4","reviews":[],"business_hours":[{"bh_day":"Saturday","bh_start":"12:00 PM","bh_end":"12:00 PM"},{"bh_day":"Sunday","bh_start":"12:00 PM","bh_end":"12:00 PM"},{"bh_day":"Monday","bh_start":"12:00 PM","bh_end":"12:00 PM"},{"bh_day":"Tuesday","bh_start":"12:00 PM","bh_end":"12:00 PM"},{"bh_day":"Wednesday","bh_start":"12:00 PM","bh_end":"12:00 PM"},{"bh_day":"Thursday","bh_start":"12:00 PM","bh_end":"12:00 PM"},{"bh_day":"Friday","bh_start":"12:00 PM","bh_end":"12:00 PM"}],"prayerTimings":[]}]

我认为问题是这样的:"http://www.serc360.com\"
通常黑斜杠用于转义字符,因此最后一个\会破坏您的字符串,并且通常,http地址的格式如下:http://,而不是 http://
希望对您有所帮助!

最新更新