-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Serialization of None
is now very inconsistent
#140
Comments
I fully agree. In my opinion the type of the deserialized value needs If you want to have None as a possible value, the node needs to describe 2013/9/4 Damien Tournoud notifications@github.com
|
I'm stuck at 1.0a5 because of this. :-( In most (perhaps all) cases, it seems like None should be serialized the same way as null. That way, colander.null doesn't leak into apps; only code that customizes Colander (validators, widgets, SchemaNode extensions, etc.) has to deal with colander.null. |
The serialization of
None
is very inconsistent since 1.0b1, because #513d860 reverted part of the special cases forNone
:String
:"None"
Boolean
:False
Date
,Time
,DateTime
:null
Integer
,Float
,Decimal
,Money
: errorGlobalObject
: errorMapping
,Tuple
,Sequence
: errorSet
,List
:None
In our schemas, we have definitions like:
(ie. result can be undefined, "success" or "failure") that are broken because
None
is now serialized to"None"
instead of passing through asnull
Any idea how to move forward from here, and what is the correct behavior?
The text was updated successfully, but these errors were encountered: