There were two sets of similar JSON serialization logic in place. This unifies them by just making all our custom objects call for_json() which already does the right thing.
The actual bug is fixed by permitting None values to serialize to JSON, iff the type of the object is "null"
Aside: I still don't understand why objects with type null exist
in the JSONSchema spec, but w/e.
Aside: I still don't understand why objects with type null exist in the JSONSchema spec, but w/e.