Looking for some clarification on missing fields: in the code shown below all is well if both fields have valid content. When the
field is missing, a missing field exception is thrown which I did not expect (because of the nullable indication). My conclusion is that this means I need to detect missing fields (using a transforming polymorphic serializer) and explicitly add a null, as in
. Would that conclusion be correct or am I missing something?
It would appear that what I was missing is that the idiomatic way to deal with missing fields is to default the field to null. That works in this case.