On Monday, 17 December 2012 19:21:16 UTC+7, Jesaja Everling 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. 
>
>
Hello. I posted an answer yesterday via email but it did not reach here 
(stuck somewhere).

I also had the same problem. My DIY solution is to do this before 
deserializing

if arbitrary:
    node.children = [
        child for child in self.children
        if child.name in data
    ]

# where 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.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/c4WS_bBWDjcJ.
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.

Reply via email to