Have you tried:
Field('url', 'json')
Anthony
On Saturday, March 29, 2014 7:11:34 PM UTC-4, mweissen wrote:
> Let's say I have
> URL(f="myfunction", vars=dict(x=1))
> or
> v = {"f":"myfunction", "vars":{"x":1}}
> URL(**v)
>
> That works fine.
>
> Now I do
> j = json.dumps(v)
>
> I store j in
> Field("url", requires=IS_JSON())
>
> Now I read this field and call URL(**fieldvalue). I get an error:
>
> <type 'exceptions.SyntaxError'> when calling URL, function or function
> name required
>
> The fieldvalue I get is
> {'u'f : u'festfunction' ... }
>
> The key is a unicode string and not utf-8 coded.
>
> What is wrong? How can I get an utf-8 string?
>
> Regards, Martin
>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.