False positive validation for strings #100

Closed
saltmueller opened this Issue Apr 4, 2013 · 0 comments

Projects

None yet

1 participant

I doubt that I am the first one to see this, so it might be a feature. But it seems like a bug to me. Apologies if I am missing something.

IMO the call to deserialize should fail in this example below. But instead the "name" dictionary of the input is converted to a string:

import colander 

class BizCard(colander.MappingSchema):
    name = colander.SchemaNode(colander.String())

json_data = {
    "name" : {
            "first": "John",
            "last": "Doe"
        }
}

schema = BizCard()
schema.deserialize(json_data)

(tested against version 1.0a2)

@mcdonc mcdonc closed this in 30f002e Aug 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment