title: Which is more secured and why JSON or XML
body: <p>I want to implement web services in Java EE whose response is going to be a JSON. This is my first attempt for doing so but before that I just want to know are there any security issues with JSON because everywhere in many blogs I read it is mentioned Like "JSON is not secured in comparison to XML". JSON has several advantages like easy to use, greater speed. </p>
  
  <p>So anyone can explain me the truth whether JSON is really unsecured or not. If so why it is. Please explain with an example.  </p>
  
  <p>There are couple old articles on the topic:</p>
  
  <p><a href="http://www.subbu.org/blog/2006/08/json-vs-xml" rel="noreferrer">JSON vs XML</a> - 2006</p>
  
  <ul>
  <li>concerns about <code>eval</code></li>
  </ul>
  
  <p><a href="http://incompleteness.me/blog/2007/03/05/json-is-not-as-safe-as-people-think-it-is/" rel="noreferrer">JSON is not as safe as people think it is</a></p>
  
  <ul>
  <li>Claims only protection for non-public data available via JSON is to use unique urls.</li>
  <li><a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery" rel="noreferrer">CSRF (Cross Site Request Fogery)</a> - 2007</li>
  <li><code>Array</code> hack highjacking parsing of JavaScript by browser.</li>
  </ul>