-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value classes not working (feature request ?) #131
Comments
Should be solved together with #80 as both cases require an extension of the RootRecordEncoder. The problem is that primitives are not wrappable in an Avro record. Therefore the API of avro4k needs to change to support this use case. I've not yet had the time to come up with a good API design that supports both the use cases (record and primitives). Feel free to contribute a proposal. |
Maybe #116 can also be solved together. The API change should be capable of this. |
I begun my work on avro4k to handle primitive types, but as you said, this lib is totally independant from kafka libs. This lib is more an avro encoder, while we need another lib for kafka. I think this lib is not dedicated for this kind of thing, because it will be too much generic. Like a Maybe the best is to really have 2 different kafka serializers: one for records, and another for primitives. I'll create a PR if needed on your other |
I just discovered that |
Done in #183 |
Hey,
Is there a way to have value classes ? (previously called inlined classes)
The goal is to wrap primitive types (string, int, in our example) inside a value class, to be used with a primitive avro schema.
error:
To reproduce:
I can help if you want, since this feature should be awesome for handling primitive keys while having a readable code (instead of ask "hey, what's inside the string key ? hexadecimal ? the name ? from whhich other field it comes ?" 😄 )
The text was updated successfully, but these errors were encountered: