I have a string that I obtain via a user, so it is not guaranteed to be a correct JSON string format.
This problem may cause the rest of the js code to be stop.
Consider the following example:
var a='==wrong string===';
var b=JSON.parse(a);
alert(1); //will not implemented
How to avoid this problem?