0

I am trying to get some data from a generic asp.net handler on am externally hosted site (though this is our company's web site and server). I have to display the data returned from this handler. jQuery is successfully making call to the handler using $.getJSON function but after that browser is throwing invalid lable error if I check firebug console. The json returned is like follows:

{"Items":[{"PubDate":"10-JAN-2012","Title":"abcdef",
       "URL":"http://example.com/xyz"}....],"Empty":"0","Message":""}

If I see response in net tab of firebug I can view the javascript objects constructed from json, but still my callback function not called and I get the error.

Please note that the same handler is working in live site.

TheVillageIdiot
  • 40,053
  • 20
  • 133
  • 188
  • **1st** test in http://www.jslint.com/ to see if it's a valid JSON; **2nd** If it is, are you using [`.parseJSON(myJson)`](http://api.jquery.com/jQuery.parseJSON/) ? – balexandre Feb 16 '12 at 11:27
  • @balexandre I will use `.parseJSON` function but it is not going into any callback, it just fails with this exception showing in `Firebug` in IE it says `invalid character line 1 position 3 expected ;` – TheVillageIdiot Feb 16 '12 at 19:09
  • have you validated the string you are getting on JSLint? what did it say? is it a valid json string? – balexandre Feb 16 '12 at 19:57
  • @balexandre no not at `jslint.com` but will do in morning when I reach office. it says **JSON: good**. – TheVillageIdiot Feb 16 '12 at 20:19
  • to help you more I really need a sample example, in jsbin.com or jsfiddle.net from what you wrote I can't say much more. – balexandre Feb 16 '12 at 21:34
  • Possible duplicate of ["invalid label" Firebug error with jQuery getJSON](http://stackoverflow.com/questions/2822609/invalid-label-firebug-error-with-jquery-getjson) – Paul Sweatte Nov 22 '15 at 05:47

0 Answers0