Using jQuery to validate JSON input into a form textarea field
How can JSON inpu开发者_JAVA技巧t into a form textarea field be validated using jQuery?
You can use jQuery.parseJSON
var theJson = jQuery.parseJSON($(this).val())
quick example on jsfiddle.
精彩评论