AJAX call fails with SyntaxError: Unexpected end of JSON input
PHP Snippet 1:
var data = {};
data['rawFiles'] =$('#projectIDs').val();
data['metadata'] = $('#getData').val();
data['type']= $('#submitType').val();
data['pid']='csv';
data['command']='data/qcTest'
PHP Snippet 2:
$.ajax({type: "POST", url: posturl, data: JSON.stringify(data), dataType: 'json'})