为什么以下JSON无效?
以下JSON未通过验证。验证器在从Can开始的第一个字符串值处投诉 它看起来像是键的有效字符串值的开始。这到底是怎么回事为什么以下JSON无效?,json,Json,以下JSON未通过验证。验证器在从Can开始的第一个字符串值处投诉 它看起来像是键的有效字符串值的开始。这到底是怎么回事 { "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 obs
{
"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."
}
}
似乎不喜欢粘贴的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."
}
}
似乎不喜欢粘贴的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."
}
}