-
Notifications
You must be signed in to change notification settings - Fork 0
Checklist for implementing new Serializers
Lojack edited this page Jan 12, 2023
·
1 revision
There's a lot to think about to make sure a new Serializer
has all the features, so here's a checklist:
- Implement core functionality (packing/unpacking logic).
- Implement
prepack
/preunpack
when needed. For container typeSerializer
s, consider something similar to whatCompoundSerializer
does to optimize only if any of the sub-serializers need a specialprepack
/preunpack
call. - Check if you need to handle
TypeVar
s at all. - Implement any transformations needed for
type_checking.annotated
to automatically unwrap theSerializer
correctly. SeeStructuredSerializer
for an example - hintedStructured
-derived classes get automatically wrapped with aStructuredSerializer
. - Tests, try to get 100% coverage to make sure you've covered all the edge cases.
- Documentation.