-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Things to check first
- I have searched the existing issues and didn't find my feature already requested there
Feature description
I am working on a project where I'd like to be able to serialize nested custom tags, or collections of custom tags. I have been trying to understand from the documentation the best approach to use, especially if I'd also like to be able to use those tags separately. It feels like it should be possible now, but I can't feel out the right way to do it. I suspect it's just a documentation/user knowledge problem, so if there is an obvious way to do this that I am not understanding, I would be more than happy to take that lesson and write up a self-contained example and paragraph for a documentation PR.
Use case
As an example, I have an Interval type which is a wrapper around a 2-tuple of floats, with operators defined for interval arithmetic. Separately, I have a Vector[T] type which is a generic numeric vector (similar to a numpy vector or glm, etc) - one common use case in my project is a Vector[Interval] - so while I've defined encoders and decoders that can be passed to default and tag_hook for the standalone types, I haven't found the right way to handle the case where Vector is a collection of Intervals (rather than float or int). Is there a way to do this that I am missing? Any pointers would be much appreciated!