Fields with 'allow_null=True' should imply a default serialization value by rpkilby · Pull Request #5518 · encode/django-rest-framework (original) (raw)
OK. We're going to take this. Ultimately it seems entailed by the decisions we've already made, and we seemed to agree at each step.
The behaviour now seems consistent. There is (already) a slight change from earlier behaviour; adding default=None
is recommended.
Maybe there's some weird combination of flags for which the behaviour is unexpected, but we need that pinned down in an actual code example if we are to proceed on it.
Even with such an example the answer might be, "use a custom field in that case" — we're not necessarily committed to covering every possible scenario.
For now, at least, we've spent long enough thinking about this one.
Thanks all.