title: correct malformed JSON data
body: <p>I'm using <code>$.ajax</code> to get <code>JSON</code> data from a REST API.</p>
  
  <p>The problem is that the <code>responseText</code> I get is malformed so I get <code>SyntaxError: JSON.parse: unexpected non-whitespace character error</code>.</p>
  
  <p>I found out that the problem is that the <code>responseText</code> is something like this:</p>
  
  <pre><code>"433
  {"Result":{"Locale":"us","ServiceId":1111,"Name":"name",
  "HDLevel":"HD Level 
  5a0
  Unknown","Category":"News","Subcategory":"ne
  5b0
  ws"}
  }"
  
  ...
  </code></pre>
  
  <p>so it can't be parsed correctly to <code>JSON</code>.</p>
  
  <p>I think I need a way to delete all those strings (<code>433</code>, <code>5a0</code>, <code>5b0</code>) and also delete new line characters.
  But I think I need a general way to delete those strings because there are more like them in my <code>responseText</code> and I can't know all names.</p>
  
  <p>Any ideas on how I can do that and obtain a correct JSON?
  Thanks</p>
  
  <p><strong>edit</strong>:</p>
  
  <p>the service uses JSON as format of the returned data and I'm using:</p>
  
  <pre><code>$.ajax({
      type: 'GET',
      url: URL,
      dataType: 'json', 
      success: function(obj) {
  
      },
      error: function( jqXHR, textStatus, errorThrown ) {
  
      },
  });
  </code></pre>
  
  <p>I can't access the service server side so I can't edit any php or other languages issues.</p>