Skip to content

Allow non-string while string-able values as map keys #114

Closed
@acruise

Description

Hey folks, this library looks pretty good so far, but I'm running into one awkwardness around Map properties keyed by something other than String.

When the key type is a data class in my own codebase, I can annotate it with a serializer with a primitive descriptor, and avro4k is happy to use that. But for an external type, I'd like to be able to have properties like Map<@Contextual SomethingExternal, Foo> and have avro4k look up the serializer for SomethingExternal dynamically from context, but it doesn't seem to do so.

I can set @file:UseSerializers on the file, but I'd rather use @Contextual. Thanks!

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions