title: How do i resolve this error " SyntaxError: Unexpected token < in JSON at position 0"
body: <p>Should the data be sent as a JSON Object or should it be sent as a string.
  These are the JSON values that needs to be sent to the url.</p>
  
  <pre><code>  var d={
    "cand_name": "markzuck",
    "candidate_management_cand_info__pkey": 14,
    "candidate_management_job_id__fkey": "1",
    "cand_email": "jagadeesh.korikana@gmail.com",
    "cand_altemail": "b@gmail.com",
    "cand_contact": "6576575576",
    }; 
  
    var url =  fetch(url, {
      method: 'POST',
      body: JSON.stringify(d),
      headers: {'Content-Type': 'application/json'}
      }).then(response =&gt; { 
         alert(JSON.stringify(d));
         return response.json(); 
      }).then(data =&gt; { 
         alert(JSON.stringify(data));
      }).catch(err =&gt; {
         console.log(d);
         alert(err);
     });
  </code></pre>