DynamoDB Enhanced - out-of-the-box support for custom AttributeConverters and StringConverters to be used in collections. #4862
Labels
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
Out-of-the-box support for custom AttributeConverters and StringConverters to be used in collections (maps, sets, lists)
Use Case
It requires a decent amount of additional code to handle serializing a custom type that is nested within a collection type (set, list, map) as it either requires a converter for the type itself and the type in any specific collection,
or re-implementing similar logic found in the DefaultAttributeConverterProvider, which is not extendable due to not being able to register custom type converters. It would be nice if the default provider would allow registering custom types to it (as well as custom string converters for map keys) so that this additional code is not needed.
Proposed Solution
Making the DefaultAttributeConverterProvider extendable would be one option. This could be done by adding a method to generate a builder from the default instance or exposing the list of all default registered providers so that a new instance can be created with defaults more easily and custom converters added to it. Additionally, the StringConverterProvider should be configurable so that custom key types can be used in maps.
Other Information
No response
Acknowledgements
AWS Java SDK version used
2.20.140
JDK version used
17
Operating System and version
MacOS 14.3
The text was updated successfully, but these errors were encountered: