You are more vulnerable to attacks if using eval
: JSON is a subset of Javascript and json.parse just parses JSON whereas eval
would leave the door open to all JS expressions.
More Related Contents:
- Post data to JsonP
- How to send JSON instead of a query string with $.ajax?
- Chrome sendrequest error: TypeError: Converting circular structure to JSON
- Serializing object that contains cyclic object value
- JSON.stringify doesn’t work with normal Javascript array
- How to stringify event object?
- Serializing an object to JSON
- Get JSON data from external URL and display it in a div as plain text
- Convert javascript object or array to json for ajax data
- Removing duplicate objects with Underscore for Javascript
- How to access nested JSON data
- How to get json key and value in javascript?
- Parsing JSON from XmlHttpRequest.responseJSON
- Express and ejs
- Nested JSON objects – do I have to use arrays for everything?
- Separate Angular2 TypeScript files and JavaScript files into different folders, maybe ‘dist‘
- JS Object this.method() breaks via jQuery
- D3 – how to deal with JSON data structures?
- Pass Json to karate-config.js file
- Passing JSON data from php to html-data attribute and then to Javascript
- How to parse JSON easily?
- Hide certain values in output from JSON.stringify()
- Safely parsing a JSON string with unquoted keys
- Why does the jQuery JSON parser need double escaping for backslashes?
- jQuery uses (new Function(“return ” + data))(); instead of eval(data); to parse JSON, why?
- Why JSON allows only string to be a key?
- How to add local json file in jsfiddle?
- Load static JSON file in Webpack
- Grouping JSON by values
- Iterate through nested json object array