dyve/jquery-autocomplete — Issue #15: no need to parse json if headers are correctly set ?
Author: mog-labs
Created: 2012-02-14 17:25:20+00:00
State: open

with remoteDataType: 'json'

- was getting error 'results is null', the following fix worked for me
.. I dont believe its necessary to parse json if the content headers are set correctly

$.Autocompleter.prototype.parseRemoteData = function(remoteData) {
var remoteDataType = this.options.remoteDataType;
if (remoteDataType === 'json') {
//return $.parseJSON(remoteData); // not needed?
return remoteData;
}
return plainTextParser(remoteData, this.options.lineSeparator, this.options.cellSeparator);
};