Not sure if its possible but ... something like below for example:
@Serializable
class From(
val foo: String,
@ExtraAttributes val additionalAttributes: Map<String, AttributeValue>,
)
Dynamap.decodeFromItem<From>(mapOf(
"foo" to S("Hello"),
"bar" to S("World!"),
))
// Gives From(foo=Hello, additionalAttributes=(bar=World!))
Not sure if its possible but ... something like below for example: