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? > > 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.
> I'm not sure how to move the "fake data source" server elsewhere, even > though I think it's node.js ... I've only watched such a critter being set > up (once, 3 nights ago, as part of a MEAN stack demo), and not done it > myself.. > >> >> >>> >>> This is a Ubuntu system (a VM); can I use tcpdump on localhost traffic? >>> I'm using the Rocket server on the web2py side; the fake-source from the >>> Grafana people is using a js server. (I'm not sure if Grafana itself is >>> using a js server, but it does have an internal server to keep track of >>> settings and such.) >>> >> >> I'm going to guess a node.js stack. Seems to use sqlite for the settings >> DB, although that probably isn't important to my problem. >> >> /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.