clarkduvall / serpy

ridiculously fast object serialization
http://serpy.readthedocs.org/en/latest/
MIT License
960 stars 62 forks source link

Fix field 'required' behavior to match DRF #38

Closed kellycampbell closed 7 years ago

kellycampbell commented 7 years ago

Non-required fields with None values are now omitted from the serialization. Also required MethodFields with None value trigger an exception now.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling de323093fc379c6979656a3b7915a4ae2e02ee3c on kellycampbell:master into 8b23833e2f4a1c92d30b7641bd430cf29307b736 on clarkduvall:master.

ahankinson commented 7 years ago

@clarkduvall any chance that either this or #25 could be merged in? I've been running a local fork for a while because serpy will blow up if it encounters an object with a missing key. It would be great to be able to bring it back to the main repo.

clarkduvall commented 7 years ago

This looks good, sorry for the (super long) delay. I'll try to do a release sometime today with this change.