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 ……
- Uncaught Error: Error calling method on NPObject.
- [Solved] Interface automation test: JSON parse error
- errorThrown:ReferenceError: data is not defined [How to Solve]
- Request processing failed; nested exception is com.alibaba.fastjson.JSONException: can not cast to J
- DataTables warning encountered using DataTables: table id = DataTables_Table_0 – Ajax error. For more information ab
- [Solved] Access to XMLHttpRequest at ‘http://127.0.0.1:5000/markdownlang/‘ from origin ‘null‘ has been bl
- [Solved] Error while extracting response for type [] and content type []…
- [Solved] Postman Error: Unsupported Media Type
- [Solved] Fatal message conversion error; message rejected; it will be dropped or routed to a dead letter exchan
- [Solved] react Error: Can‘t perform a React state update on an unmounted component
- [Solved] lua error: no resolver defined to resolve
- Tomcat Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors
- JSON parse error: Can not deserialize instance of java.lang.String out of START_OBJECT token
- Axios request failed, get the status code and error information, how to encapsulate the function dealing with the public error code
- How to Solve Jquery 1.9 $.browser Error
- Error received: error: xhr’get’to URL cross domain [How to Solve]
- The tree component in easyUI does not display data or displays undefined solutions
- Fetch Error: Failed to execute ‘fetch’ on ‘Window’: Request with GET/HEAD method cannot have body
- How to Solve Springboot Error: Failed to convert value of type