I have a JSON parse error that I can\'t debug. Code below:
$(document).on(\'submit\', \'#confirmreset\', function(event) {
event.preventDefault();
v
You don't need to call $.parseJSON if the server is sending valid JSON as jQuery will parse it automatically when it retrieves the response. I don't know the exact criteria, but if you set the Content-type: application/json header it definitely will.
This error can be caused by using single quotation marks (') instead of double (") for strings.
The JSON spec requires double quotation marks for strings.
See also:
https://stackoverflow.com/a/14355724/1461850