uncaught syntaxerror unexpected token U JSON
Solution 1:
That error is normally seen when the value given to JSON.parse
is actually undefined
.
So, I would check the code that is trying to parse this - most likely you are not parsing the actual string shown here.
Solution 2:
I was getting this message while validating (in MVC project). For me, adding ValidationMessageFor element fixed the issue.
To be precise, line number 43 in jquery.validate.unobtrusive.js caused the issue:
replace = $.parseJSON(container.attr("data-valmsg-replace")) !== false;