title: Ajax call results in typeparserroroccured, with syntaxError: unexpected token
body: <p>I'm attempting to do an AJAX call, and I am forming an associative array :
  when I list dataType: as JSON I receive the <strong>syntax Error: unexpected token</strong>, when I send with data-type HTML it works fine, however I cannot access the <code>data.success</code> property of the return array, unless I send datatype JSON.</p>
  
  <pre><code>var participant_information = 
  {"Username":participant_name,"relation":participant_relation,"action":action};
  
  
   $.ajax({
        url: '&lt;?php echo base_url();?&gt;transaction/manage_participant/',
        async: false,
        type: 'POST',
        data: {participant_information : participant_information},
        dataType: 'json',
        success: function(data) {
  
        if(data.success) { }
  
  
        }
  </code></pre>
  
  <h2>PHP</h2>
  
  <pre><code>$status['success'] = 'success';
  
      echo json_encode($status); 
  </code></pre>