On 17 December 2012 19:21, Jesaja Everling <[email protected]> wrote:
> Hi all,
>
> I'm trying to validate JSON data with Colander, and have a little
> trouble finding the right way to support arbitrary key names.
>
Hi. I also had the same problem. My DIY solution:
# do this somewhere before deserializing
if arbitrary:
node.children = [
child for child in self.children
if child.name in data
]
# data is some struct like request.POST
It's ugly. If anyone has a better idea, or colander actually supports
this, please let us know.
--
http://kusut.web.id
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.