Loading ...
Sorry, an error occurred while loading the content.

JSON and JSLint

Expand Messages
  • alistair_braidwood
    Hi, Thanks to Douglas for the invite to the group. I m glad I could be helpful :) Now I m having difficulties using http://jslint.com on my JSON data due to
    Message 1 of 1 , Jun 12, 2007
    • 0 Attachment
      Hi,

      Thanks to Douglas for the invite to the group. I'm glad I could be
      helpful :)

      Now I'm having difficulties using http://jslint.com on my JSON data
      due to the use in JSON of quotes around keys which are non-reserved
      words (I get a "Too many errors, stopping" message). I think it would
      be handy if there were checkboxes in the options to tolerate both the
      too many errors (less important) and JSON key quoting (very useful).

      if((!s||!s.reserved)&&!toleratejsonkeyquoting){
      warning("'{a}' is better written without quotes ...

      JSLint is great for spotting bugs due to browser tolerance. If you've
      got a lot of JSON data, it's sometimes hard to figure out where a
      missing quote or extra comma are.

      Example works in FF, not IE (which is reasonable as it's wrong)
      var a = {"a":1,};

      thanks,
      Alistair
    Your message has been successfully submitted and would be delivered to recipients shortly.