[web2py] Re: Problem with JSON

2015-02-18 Thread Niphlod
to be fair, I think you encountered a minor glitch response.json() now sets the content-type to application/json (something that your app should have done already, but probably overlooked). Returning a json string with text/html as content-type made jquery not aware that that string was

[web2py] Re: Problem with JSON

2015-02-18 Thread Ivan Gazzola
Ok, solved :) The issue was in some changes in Jquery. Now JQuery parses ajax response before than it is passed to success function, so js fails if I call "parse" on it: risposta=JSON.parse(json); ^^^ THX Ivan Il giorno lunedì 16 febbraio 2015 21:12:17 UTC+1,

[web2py] Re: Problem with JSON

2015-02-16 Thread Niphlod
uhm. what does your shell print out of this ? response.json({'html' : XML('bar')}) mine does u'{"html": "bar"}' so it's not the issue you're describing. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://co