On Friday, December 2, 2016 at 5:53:46 PM UTC-8, Dave S wrote: > > > > On Friday, December 2, 2016 at 12:10:55 PM UTC-8, Dave S wrote: >> >> >> >> On Thursday, December 1, 2016 at 12:15:50 AM UTC-8, Dave S wrote: >>> >>> >>> >>> On Monday, November 28, 2016 at 11:11:48 PM UTC-8, Dave S wrote: >>>> >>>> On Monday, November 28, 2016 at 3:23:59 PM UTC-8, Massimo Di Pierro >>>> wrote: >>>>> >>>>> response from web2py controller? web2py returns bytes. It is up to you >>>>> to put utf8 or ascii in there. web2y does not care. >>>>> >>>>> >>>>> >>>> Okay, I overrode the Content-Type header to remove the "charset: >>>> utf-8", and I set enforce_ascii in the simplejson.dumps(), but I still >>>> have >>>> 50 or so single-char objects rather than 1 hierarchical object. I also >>>> tried applying str() before the dumps(), without any improvement. Since >>>> I'm using FF's network tab, I can't see if there is any difference in the >>>> packets, only what FF decoded the packets as. >>>> >>> >>> Any suggestions here? >>> >>> >> Okay, moving my code to a different server lets me do tcpdump, and I see >> that I am indeed shipping ASCII. What I can also see is that there are >> quotes (in the tcp packet body) around my json string, both for the >> hand-crafted json and the responses done with json.dumps() ... is this >> expected? >> >> Because this is a service, I'm not doing anything explicit about a view file. I have it decorated with @service.json.
> > I have access to a java-based server that I can get json from, and it > doesn't seem to have the whole response wrapped in quotes. > Any suggestions here? I seem to be spinning my wheels. /dps -- 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.