On Monday, April 20, 2015 at 9:16:49 PM UTC+2, Jim S wrote: > > Shoot, so now I have to have different behavior based on the web2py > version. If I fix this code so it runs properly, it will quit working on > my production servers unless I upgrade them to 2.9.12 or later. > > Again, the only difference is on setting or not the content-type. Your app will work on any web2py if you care to set content-type to application/json . "older" web2py will NEED it, "newer" will set it if not found. Views will need "stripping" parseJSON as they will happily parse a json object automatically.
> To make it compatible with both versions I'd need to use > json.dumps(list_of_dictionaries) instead of > response.json(list_of_dictionaries), right? But then that is the wrong > behavior in the long run, right? > Yes, it's wrong to return a json object as text/html. -- 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.