You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to structure the mappers for my types in a bottom-up way, rather than specifying everything from the top level, and pass various context data down. This is the sort of thing I have currently:
It'd be great if there was a cleaner way to handle this, such as a delegate method that specifies a mapper to delegate mapping of a given type to (or infer from the types encoders/decoders/mappings are specified for?)
The text was updated successfully, but these errors were encountered:
I'm not sure I follow. From your example, it looks like you'd want a function TomlMapperConfigurator.delegate<T>(mapper: TomlMapper), or perhaps TomlMapperConfigurator.delegate(typesToDelegate: Set<KType>, mapper: TomlMapper), which would basically inherit transcoding for the given type(s) from the given mapper. Is that right?
Yep, that's right. I'm not sure whether specifying types upfront or having them be inferred would be better; but it's important that decoders/encoders defined in a TomlMapper take precedence over delegated mappers if they are inferred.
I'd like to structure the mappers for my types in a bottom-up way, rather than specifying everything from the top level, and pass various context data down. This is the sort of thing I have currently:
It'd be great if there was a cleaner way to handle this, such as a
delegate
method that specifies a mapper to delegate mapping of a given type to (or infer from the types encoders/decoders/mappings are specified for?)The text was updated successfully, but these errors were encountered: