Somehow i do not think it has anything to do with JSON. Nobody analyzes passed values on client.
With AJAX there are 2 to tango :) I think it's the server side that has a problem... George. On Nov 14, 6:00 pm, Technocrat <[EMAIL PROTECTED]> wrote: > I am using the AJAX class with the dataType set to json and cache off. > I am polling with the this class about every 2 minutes. > > So here what I am doing to get the error and it is reproducible. I > have everything set really simply right now. > > Here is the success function I am using: > function(data) { > alert(data.id);} > > It just set to alert so I can see what's going on. > > Here is the first JSON data getting passed to it: > {"name":"","id":0} > > And I get an alert that says 0. So far so good. > > Next poll I get: > {"name":"test","id":22} > > And I get an alert that says 22. Still fine. > > Next poll I get: > {"name":"","id":0} > > I get an alert of 22!? Which is wrong. > > Next poll I get: > {"name":"test2","id":23} > > And I get an alert that says 23. Ok back on track. > > Next poll I get: > {"name":"","id":0} > > I get an alert of 23!? Which is wrong again. > > So for some reason if a value gets set to 0 it doesn't send back a > proper 0 it send back a previous value. I changed from json to text > to make sure the data was correct and it shows correctly on each > poll. So this appears to be a json only issue. > > My guess is there is a not equal statement some where that is not > correct.