Open WilliamJamieson opened 1 year ago
A first tangential thought on this is that maybe we should allow libraries to control the "search" order for searching the Extensions
for a viable Converter
as there are circumstances where one might want to insert a Converter
one wants to try first and then if it "rejects" fall back on a builtin converter.
This is somewhat related to #1086 (at least in-so far as documenting the current tag handling behavior).
In astropy/asdf-astropy#144 I describe solution (2) here: https://github.com/astropy/asdf-astropy/issues/144#issuecomment-1343410493 with more details here: https://github.com/astropy/asdf-astropy/issues/144#issuecomment-1343411260.
I think this solution requires more exploration.
As a recap the idea is to create a system where-in:
Converter
instance can "reject" serializing a given object.Converter
to attempt serialization.This seems like a nice system to have as it would allow users to handle serializing objects that have been determined by previous
Converters
to not be serializable.