Avadhesh Kumar Patel
District Project Manager - Aligarh
14 months work experience in Panchayati Raj Department Sector as District Project Manager & 12 months work experience in IT Sector as Software Engineer. :-)
Security and JSON Parser to understand by below examples // Include http://www.json.org/json.js
var myObject = myJSONtext.parseJSON(); eval() can compile and execute any JavaScript program, so there can be security issues (cross-site scripting)Use eval() when the source can be trusted When security is a concern - the source cannot be trusted -, it is better to use a JSON parser
A JSON parser will only recognize JSON text and so is much safer Object to Text Conversion var myJSONText = myObject.toJSONString(); You can convert JSON object into JSON text JSON does not support cyclic data structure Do not give cyclical structures to the JSON stringifier
Liked By
Write Answer
what the Security and JSON Parser
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
AVADHESH PATEL
06-Jun-2013// Include http://www.json.org/json.js
var myObject = myJSONtext.parseJSON();
eval() can compile and execute any JavaScript program, so there can be security issues (cross-site scripting) Use eval() when the source can be trusted
When security is a concern - the source cannot be trusted -, it is better to use a JSON parser
var myJSONText = myObject.toJSONString();
You can convert JSON object into JSON text
JSON does not support cyclic data structure
Do not give cyclical structures to the JSON stringifier