Posted By

vaibhav011286 on 10/04/11


Tagged


Versions (?)

Minimized JS is_json() function


 / Published in: JavaScript
 

  1. function is_json(a) {
  2. if (!a || a.toString() === "") return !1;
  3. try {
  4. return $.parseJSON(a.toString())
  5. } catch (b) {
  6. return !1
  7. }
  8. }
  9.  
  10. // Requires jQuery Library to parse json string.

Report this snippet  

You need to login to post a comment.