plain-vanilla-games/schematics — pull request #1 by johannth (2013-03-18 08:37:38+00:00)
Title: Implemented the possibility to skip a field when serializing if the value is None

Sometimes it can be convenient (and logical) to skip a key in serialization if the value is `None` instead of returning `null`. We, for example, have a `Question` model that has a type and potentially a dictionary of resources modelled by a `QuestionResource` instance. Basic text questions don't have any resources and somehow it feels cleaner to not return the `resources` key instead of returning `null` or an empty dictionary. This is a matter of opinion though as clients can easily do the necessary checks.

We could also model it using inheritance `TextQuestion` and `PictureQuestion` but that complicates things when we want to enforce a list of `Question` object but still keep the type. schematic could be modded to support that but is probably more complicated than this simple addition.