Currently, my method in JavaScript involves utilizing the eval
function to transform JSON data retrieved from the server into an object.
eval ("myObject="+data);
I have received feedback that using eval
is considered 'evil' and could potentially create major security vulnerabilities.
This raises the question - Is it common practice to use eval
for converting JSON data to an object? Or is there a more secure alternative?