1. Core source code
# Convert string JSON to JSON object
dataJson=json.loads(jsonStr, strict=False)
2. Cause of problem:
Error copying and pasting a string as a string literal into Python source code.
3. Solution:
In this case, \n is interpreted as a single character (newline character). You can fix it by using the original string text (R ”, use three quotation marks R ” ”… ” ‘to avoid escaping the’ ‘quotation marks in the string text)
Similar Posts:
- Error reporting of Python STR type dictionary conversion
- Treatment of MySQL database keyword as column name by mybatisplus — sqlsyntax errorexception: you have an error in your SQL syntax;
- JAVA Error: too many characters in character literal
- About BeanShell error invoking BSH method
- [How to Solve Error] warning: LF will be replaced by CRLF in README.md.
- [Solved] SyntaxError: unexpected character after line continuation character
- How to Solve Python SyntaxError: EOL while scanning string literal
- Git commit -m ‘Add Readme’ error: pathspec ‘Readme” did not match any file(s) known to git
- Python:SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in pos…