Re: [web2py] response.json() not working?
Richard - I saw that thread too before I posted my message. I'm assuming this is the same issue. I have a workaround, but just pointing out that this used to work and now it doesn't, breaking backward compatibility. ...unless I was just doing it wrong and by chance it worked... -Jim On Monday, April 20, 2015 at 1:10:56 PM UTC-5, Richard wrote: > > > https://groups.google.com/forum/#!searchin/web2py/response.json()/web2py/7EJ0-rOd1bo/iR6YWJOSaQgJ > > On Mon, Apr 20, 2015 at 12:28 PM, Jim S > > wrote: > >> I have some controller methods that I call using ajax and they return a >> json string using: >> >> return response.json(list_of_dictionaries) >> >> I just realized today that it isn't working on newer releases. Based on >> the web2py releases that I have, I can see that it works in 2.9.5 but not >> 2.9.12. Also, does not work in 2.10.4 beta from today. I can get it >> working by simply replacing: >> >> return response.json(list_of_dictionaries) >> >> with >> >> return json.dumps(list_of_dictionaries) >> >> The problem (at least as I see it) is that backward compatibility is >> broken. Was I using it incorrectly to begin with? If this is a bug I'd be >> happy to open a ticket. I'd like some confirmation from others whether or >> not you see it as a bug or a misuse on my part. >> >> -Jim >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+un...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] response.json() not working?
I just saw this post pass I though it could be related... I read that there seems to have issue with response.json... Sorry that it not help... Richard On Mon, Apr 20, 2015 at 2:13 PM, Niphlod wrote: > > > On Monday, April 20, 2015 at 8:10:56 PM UTC+2, Richard wrote: >> >> >> https://groups.google.com/forum/#!searchin/web2py/response.json()/web2py/7EJ0-rOd1bo/iR6YWJOSaQgJ >> >> > @richard: that's not helping: @jim is using response.json in a controller, > that is supported, not in a view, that is not supported. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] response.json() not working?
On Monday, April 20, 2015 at 8:10:56 PM UTC+2, Richard wrote: > > > https://groups.google.com/forum/#!searchin/web2py/response.json()/web2py/7EJ0-rOd1bo/iR6YWJOSaQgJ > > @richard: that's not helping: @jim is using response.json in a controller, that is supported, not in a view, that is not supported. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] response.json() not working?
https://groups.google.com/forum/#!searchin/web2py/response.json()/web2py/7EJ0-rOd1bo/iR6YWJOSaQgJ On Mon, Apr 20, 2015 at 12:28 PM, Jim S wrote: > I have some controller methods that I call using ajax and they return a > json string using: > > return response.json(list_of_dictionaries) > > I just realized today that it isn't working on newer releases. Based on > the web2py releases that I have, I can see that it works in 2.9.5 but not > 2.9.12. Also, does not work in 2.10.4 beta from today. I can get it > working by simply replacing: > > return response.json(list_of_dictionaries) > > with > > return json.dumps(list_of_dictionaries) > > The problem (at least as I see it) is that backward compatibility is > broken. Was I using it incorrectly to begin with? If this is a bug I'd be > happy to open a ticket. I'd like some confirmation from others whether or > not you see it as a bug or a misuse on my part. > > -Jim > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.