title: 'Fake' an API response for testing
body: <p>We are trying to recreate some of the responses from a live API locally for testing purposes.</p>
  
  <p>We are trying to build a very basic PHP replica that responds to the Ajax requests with JSON.The code below is what I have it returning right now as a string and the error on the other end throws up an error:</p>
  
  <pre><code>"Uncaught TypeError: Cannot read property 'instanceId' of undefined".
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>$var = "{'request':{'instanceId':'1234546','usage':'1'}}";
  echo($var);
  </code></pre>
  
  <p>We have tested and it works with the live API. So it something that I am doing wrong when trying to return the dummy JSON data. Now as far as I am aware this is not a valid JSON response, is there a way to easily 'fake' the response with something like I have above?</p>