2011-06-09 72 views
1

以下JSON沒有經過驗證。驗證抱怨到起始於"Can an officer...爲什麼以下JSON無效?

它看起來像爲重點的有效字符串值的開始的第一個字符串值。在地球上可能是什麼問題呢?

{ 
    "DUI": { 
     "Can an officer arrest me because he smelled alcohol on my breath?":"<br />No, odor alone is not sufficient basis for arrest. However, odor combined with other observations such as weaving, slurred speech, and bloodshot eyes 
may be enough to give an officer probable cause to arrest you for DUI.", 
     "Can I be convicted if I refused to take the breath test or the result was below .08?":"<br />Yes, in Washington the prosecutor can prove DUI one of two ways: 1. Blood or breath test result above .08, OR 2. Proof the person was under the 
influence of or affected by liquor or drugs. 
<br /><br />Additionally, if a person refused to take a test, that fact may be introduced as evidence at trial.", 
     "How can I be arrested if I wasn't driving my car?":"<br />A person who is in physical control of a vehicle and appears to be under the influence of drugs or alcohol may be arrested and charged under RCW 
46.61.504.", 
     "What can I do now that I have been charged?":"<br />Contact an attorney to find out what options are available to you." 
    } 
} 

回答

5

似乎並不像一些換行符出現在粘貼的JSON:

Parse error on line 3: 
...ohol on my breath?":"<br />No, odor alon 
-----------------------^ 
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[' 

我粘貼的JSON從你的問題到驗證和刪除不必要的換行符 - 這工作:

{ 
    "DUI": { 
     "Can an officer arrest me because he smelled alcohol on my breath?": "<br />No, odor alone is not sufficient basis for arrest. However, odor combined with other observations such as weaving, slurred speech, and bloodshot eyes may be enough to give an officer probable cause to arrest you for DUI.", 
     "Can I be convicted if I refused to take the breath test or the result was below .08?": "<br />Yes, in Washington the prosecutor can prove DUI one of two ways: 1. Blood or breath test result above .08, OR 2. Proof the person was under the influence of or affected by liquor or drugs.<br /><br />Additionally, if a person refused to take a test, that fact may be introduced as evidence at trial.", 
     "How can I be arrested if I wasn't driving my car?": "<br />A person who is in physical control of a vehicle and appears to be under the influence of drugs or alcohol may be arrested and charged under RCW 46.61.504.", 
     "What can I do now that I have been charged?": "<br />Contact an attorney to find out what options are available to you." 
    } 
} 

http://jsonlint.com/

+0

燁;我誤讀這一點。 – 2011-06-09 06:37:33