title: Is this a valid JSON response?
body: <p>G'day gurus,</p>
  
  <p>I'm calling the REST APIs of an enterprise application that shall remain nameless, and they return JSON such as the following:</p>
  
  <pre><code>throw 'allowIllegalResourceCall is false.';
  {
    "data": ... loads of valid JSON stuff here ...
  }
  </code></pre>
  
  <p>Is this actually valid JSON?  If (as I suspect) it isn't, is there any <em>compelling</em> reason for these kinds of shenanigans?</p>
  
  <p>The response I received from the application vendor is that this is done for security purposes, but I'm struggling to understand how this improves security much, if at all.</p>
  
  <p>Thanks in advance!</p>
  
  <p>Peter</p>