[jQuery] AJAX w/dataType='json', doesn't correctly handle boolean response?

2009-11-19 Thread livefree75
Hi, I'm using the following code on the client side: $.ajax({ dataType : 'json', // other options success : function(json_response) { console.log(typeof response, response); // Using Firefox's firebug } }); And this PHP code on the server side: ?php

Re: [jQuery] AJAX w/dataType='json', doesn't correctly handle boolean response?

2009-11-19 Thread Michael Geary
You would normally expect that to work. What content-type is your server putting in the header for the JSON data? That could be throwing it off. Also note that a bare primitive value (true, false, null, or a string or number) is not valid JSON. The only valid JSON is either an object enclosed in