lexical error: inside a string, '\' occurs before a character which it may not
lexical error: inside a string, '\' occurs before a character which it may not
我正在使用 Amazon SDK 将文档上传到 CloudSearch。文件格式为JSON。当我尝试上传数据时,出现以下错误-
{ ["lexical error: inside a string, '\' occurs before a character which it may not.
attern can be escaped with a \ some\ file will match a file
(right here) ------^
(near operation with index 1; document_id 14266553008620)"] }
我已经使用 JSONLint 验证了 JSON 文件并且验证成功。
为什么会这样?
通过将单个反斜杠替换为双反斜杠(即文字反斜杠)来解决。
我正在使用 Amazon SDK 将文档上传到 CloudSearch。文件格式为JSON。当我尝试上传数据时,出现以下错误-
{ ["lexical error: inside a string, '\' occurs before a character which it may not.
attern can be escaped with a \ some\ file will match a file
(right here) ------^
(near operation with index 1; document_id 14266553008620)"] }
我已经使用 JSONLint 验证了 JSON 文件并且验证成功。
为什么会这样?
通过将单个反斜杠替换为双反斜杠(即文字反斜杠)来解决。