I was just curious if there would be a way to recover, for example another parameter you could pass to parse. There isn't though.
constprotein={steak:"🥩",bacon:"🥓",fake:{shrimp:"🍤"},array:["🥩","🥓","🍤"]}// looks weird but worksJSON.parse(JSON.stringify(protein,null,"\n\t\n\0\r "))// SyntaxErrorJSON.parse(JSON.stringify(protein,null,"🥓"))// and my favorite:// parses as `{sh: "🍤", steak: "🥩", bacon: "🥓"}`// but breaks nested objects or arrays.JSON.parse(JSON.stringify({steak:"🥩",bacon:"🥓"},null,'"sh":"🍤",'))
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I was just curious if there would be a way to recover, for example another parameter you could pass to
parse
. There isn't though.