0
當我試圖解析此JSON我在http://jsoneditoronline.org/JSON畸形如何糾正
[{"urltitle":"","urltypeid":"2,4,4,5,5","seriesname":"Census of State and Federal Correctional
Facilities","titleb":"Census of State and Federal Correctional Facilities, 1995","url":"\/content\/pub\/press
\/CSFCF95.PR,\/content\/pub\/pdf\/CSFC95EX.PDF,\/content\/pub\/pdf\/Csfcf95.pdf,\/content\/pub\/ascii
\/csfc95ex.txt,\/content\/pub\/ascii\/csfcf95.txt","releasedate":"1997-08-07 00:00:00.0","urltype":"Press Release
","pubproductid":535,"title":"CENSUS OF STATE AND FEDERAL CORRECTIONAL FACILITIES, 1995","tagkeywords":""},
{"urltitle":"","urltypeid":"2,4,4,5,13","seriesname":"Indicators of School Crime and Safety","titleb":"Indicators
of School Crime and Safety, 2000","url":"\/content\/pub\/press\/iscs00.pr,\/content\/pub\/pdf\/iscs00.pdf,
\/content\/pub\/pdf\/iscs00ex.pdf,\/content\/pub\/ascii\/iscs00.txt,\/content\/pub\/sheets
\/iscs00.zip","releasedate":"2000-10-26 00:00:00.0","urltype":"Press Release
","pubproductid":992,"title":"INDICATORS OF SCHOOL CRIME AND SAFETY, 2000","tagkeywords":""}]
你不「糾正」壞json。你首先糾正產生JSON的任何東西。 –
我實際上在http://jsonlint.com/上測試了這一點,並且存在許多問題,文本在多行中被打破。你不能在json中找到它,並且需要糾正,就像Marc B所說的那樣。 –