The problem is that you are creating the string you want to return and then
putting it in a dictionary. You could just have returned the string. That
said it's better to use response.json which does a few other things for you.
Try this
def dashboard():
call_clicks = db().select(db.dashboard
thanks Dave.
I wasn't Base64 encoding it myself. The "=" is there in the string returned
by Google Talent Solution. Perhaps they've Base64 encoded it.
For now, I am percent-encoding/decoding it. It looks like it's nothing do
to with Web2py but I'd still like to know what is tripping loads() up.
On Sunday, November 4, 2018 at 5:06:33 AM UTC-8, Carl Hunter Roach wrote:
>
> As suspected, my workaround was to URL encode the "offending" fields at
> the client end. simpleton.loads() then parsed the json happily. The field
> could then be "unencoded".
>
> My system has plenty of json passing
As suspected, my workaround was to URL encode the "offending" fields at the
client end. simpleton.loads() then parsed the json happily. The field could
then be "unencoded".
My system has plenty of json passing between clients and the Web2py
service. I can't work out why I've tripped over here.
Well, you'd look at using a client side templating library. Sane people use
mustache or handlebars, I prefer Jqote2.
On Thursday, April 3, 2014 5:38:22 PM UTC-7, Ramesh Aj wrote:
>
> I am reading data from remote machine and converting it into dictionary
> format
> like
> {IP: [192.111.111.111
I want it to be rendered directly in the javascript:
...
events: [{{}} = jsonData]
_
*Gilson Filho*
*Web Developer
Blog:* blog.gilsondev.com
*Twitter:* twitter.com/gilsonfilho
2011/1/20 DenesL
>
> You either return the json yourself or you let web
You either return the json yourself or you let web2py do it.
If you do it:
response.headers['Content-Type']='application/json'
return json.dumps(dict(id=ag.agenda.id, ...))
or if you want web2py to do it:
return dict(id=ag.agenda.id, ...)
and call it with .../index.json
in this case you
7 matches
Mail list logo