Closed anentropic closed 7 years ago
no, actually it doesn't behave that way at all, I was hallucinating
Maybe README could make clearer what required
attr is used for.
required=False
just bypasses the field's type-coercion, a kind of a short-circuit for null/None value. The name is a bit misleading.
Serpy seems to be designed to omit a field from the serialized data if the field has
required=False
However if you use a Serializer as a field, i.e. a child serializer, then the field is always present in the data.
Is this inconsistency deliberate?
...or should this part maybe not be indented as part of the
else
block? https://github.com/clarkduvall/serpy/blob/master/serpy/serializer.py#L110