[system]SyntaxError: Unexpected token u in JSON at position 0

It was another day when I was annoyed by the bug. The error reports were as follows:


annotated all the codes, debugged them one by one, and finally found the error location:

after consulting the data, I found that JSON. Parse() can only process JSON format. If no item is passed in, it is equivalent to processing null values, Therefore, you can make a judgment before processing:

there is no problem.

Read More: