aws / aws/aws-sdk-java-v2

DynamoDB Enhanced - out-of-the-box support for custom AttributeConverters and StringConverters to be used in collections.

Open
#4,862 0 comments 0 reactions 0 assignees View on GitHub
feature-request p2
Dominant language
Java
Stars
2.6k
Forks
1k
Avg merge
2d 9h
Merged PRs (30d)
51

Description

### 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

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS Java SDK version used

2.20.140

### JDK version used

17

### Operating System and version

MacOS 14.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.