Controller code:
Front end Ajax request code:
The status code 200 indicates that the request is successful, but the pop-up window (data returned by the server) cannot be received
Question tips:
SyntaxError:JSON. parse:unexpected character at line 1 column 1 of the JSON data
It is speculated that there was an error in parsing JSON data. The server wanted to use the string as JSON, but the format conversion failed
The reason is that I set the datatype in the Ajax request to “JSON”. JQuery will convert the string in the resp to JSON format according to this, but the conversion fails. Just comment out this line.
Read More:
- [Solved] JSON parse error: Unexpected character (‘‘‘ (code 39)): was expecting double-quote to start ……
- [Solved] JSON parse error: Unexpected character (‘‘‘ (code 39)): was expecting double-quote to star
- vue VM682:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
- [Solved] SyntaxError: Unexpected end of JSON input
- Syntaxerror: unexpected end of JSON input [How to Solve]
- [Solved] Parsing JSON error unexpected end of JSON input
- Template cannot be rendered due to the joint query of populate in mongoose: syntax error: unexpected token r in JSON at position 0
- [Solved] Interface automation test: JSON parse error
- How to parse JSON string in.Net [error reading job object from jsonreader. Current jsonreader item is not an obj]
- [Solved] hello.s:15 Error: junk at end of line, first unrecognized character valued 0x8
- JSON parse error: Can not deserialize instance of java.lang.String out of START_OBJECT token
- frida.InvalidArgumentError: script(line *): SyntaxError: unexpected end of string
- Json: struct field readyReplicas has json tag but is not exported [How to Solve]
- [Solved] Canal Error: CanalParseException: column size is not match,parse row data failed
- JSON parse error: raw timestamp (1595952000000) not allowed for
- VScode jsconfig.json files First Line error for no reasons
- Causes of error in data transmission from spring boot to JSON
- [Solved] Redis Cache Error: org.springframework.data.redis.serializer.SerializationException: Could not read JSON..
- [Solved] Docker Error: SyntaxError: Non-ASCII character ‘\xe5‘ in file xxx
- [Solved] Opencv Error: Error: Assertion failed (data) in cv::Mat::at, file … mat.inl.hpp, line 897(Accessed pixels of non-existent matrix)