Given a string of JSON data, how can youI safely turn that string into a JavaScript object?
Obviously youI can do this unsafely with something like...:
var obj = eval("(" + json + ')');
...but but that leaves usme vulnerable to the jsonJSON string containing other code, which it seems very dangerous to simply eval.