How can JSON input into a form textarea field be validated using jQuery?
1 Answer
You can use jQuery.parseJSON
var theJson = jQuery.parseJSON($(this).val())
quick example on jsfiddle.
1 Comment
Beer Me
Update many years later: jQuery.parseJSON() is deprecated. You should use JSON.parse() instead.