It’s normal to jump and pass parameters using JSON, but today I don’t know why I reported an error, unexpected end of JSON input,
reason
I found the answer on the Internet because there are unrecognized contents in the passed parameters, and the parameters I passed contain rich text, Therefore, there is no resolution
solution
start with JSON character parameters (parent page) on the page to jump to
issueanswer(item){
let arrar = JSON.stringify(item)
uni.navigateTo({
url:"issueanswer?arr="+encodeURIComponent(arrar)
})
},
Then accept and parse the parameters in onload of the sub page
onLoad(option) {
this.arr =JSON.parse(decodeURIComponent(option.arr))
},
Read More:
- [Solved] SyntaxError: Unexpected end of JSON input
- Syntaxerror: unexpected end of JSON input [How to Solve]
- [Solved] SyntaxError:JSON.parse:unexpected character at line 1 column 1 of the JSON data
- Json: struct field readyReplicas has json tag but is not exported [How to Solve]
- [Solved] JSON parse error: Unexpected character (‘‘‘ (code 39)): was expecting double-quote to star
- [Solved] JSON parse error: Unexpected character (‘‘‘ (code 39)): was expecting double-quote to start ……
- vue VM682:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
- Template cannot be rendered due to the joint query of populate in mongoose: syntax error: unexpected token r in JSON at position 0
- Parsing error in eslint parsing: unexpected token [How to Solve]
- [Solved] Interface automation test: JSON parse error
- net.sf.json .JSONObject maven20381;- 36182;
- How to parse JSON string in.Net [error reading job object from jsonreader. Current jsonreader item is not an obj]
- Error: Comments are not permitted in JSON [How to Solve]
- [Solved] MongoDB Error: TypeError: Object of type ObjectId is not JSON serializable
- [Solved] Error: Cannot find module ‘webpack-cli/package.json‘
- frida.InvalidArgumentError: script(line *): SyntaxError: unexpected end of string
- VScode jsconfig.json files First Line error for no reasons
- [Solved] SpringBoot Error: HttpMediaTypeNotSupportedException: Content type ‘application/json‘ not supported
- Wechat Applet error: [app.json file content error] app json: [“usingComponents“][“van-button“]: “@vant/weapp/lib/button/index
- [Solved] Failed loading positionFile: /opt/module/flume/taildir_position.json