I have a string in javascript:
var test = {"test":"\-"}
当我试图将这一点与以下几个方面混为一谈:
JSON.parse(test)
or with:
$.parseJSON(test)
I get a SyntaxError of type "unexpected_token_number".
This the value for the "test"
attribute is a user enterable field. How should I properly escape this field?