var c = "[{'mid':'28275','url':'\/static\/image\/realNameImage\/2020\/January\/7\/A30gdmb2_750X1000.png'}, {'mid':'28275','url':'\/static\/image\/realNameImage\/2020\/January\/7\/A30gdmb2_750X1000.png'}]"
console.log(JSON.parse(c))
At first glance, the code is completely flawless, but there is always unexpected redUncaught SyntaxError: Unexpected token ' in JSON at position 2 at JSON.parse (< anonymous>) at < anonymous>: 1:18
But I have no problem with this operation
var c = '[{"cid":"28275","url":"\/static\/image\/realNameImage\/2020\/January\/7\/5wMUlxsZ_750X1000.png"},{"cid":"28275","url":"\/static\/image\/realNameImage\/2020\/January\/7\/PE4ju0oT_750X1000.png"}]'
console.log(JSON.parse(c))
Fuck, why
What’s the reason
this article is shared by WeChat official account – itDog programmer (newObject-007).
Similar Posts:
- How to Solve Error: Unexpected token o in JSON at position 1
- When parsing background JSON data with Ajax: unexpected token o in JSON at position 1
- Uncaught SyntaxError: Unexpected token o
- [Solved] Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse
- [Solved] MYSQL ERROR 1093 – You can’t specify target table ‘readbook’ for update in FROM clause
- Error reporting of console.log in eslint
- [Solved] Uniapp Axios appears in wechat applet index.js? [SM]: 33 errortyerror: l is not a function error
- Node unexpected token import
- [Solved] Error-Javascript: Uncaught Error: Malformed UTF-8 data at Object.stringify (crypto-js.js:478) at W…