Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive validation for strings #100

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

False positive validation for strings #100

saltmueller opened this issue Apr 4, 2013 · 0 comments

Comments

@saltmueller
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant