-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Redis key / value serializer #34329
Comments
/cc @cescoffier (redis), @gsmet (redis), @machi1990 (redis) |
Would having support for TypeReference be enough? |
It would be nice to be able to configure Jackson ObjectMapper and set default typing. |
you can already do that by customizing the object mapper of quarkus (https://github.com/quarkusio/quarkus/blob/main/integration-tests/jackson/src/main/java/io/quarkus/it/jackson/MyObjectMapperCustomizer.java) |
What if you use Jackson for Redis and elsewhere to make rest calls ? |
It uses the same mapper. Mapper are heavy objects. We don't want to create many of them. |
Unfortunately you don't get to choose the payload format when you call
external systems
Le mar. 27 juin 2023, 20:32, Clement Escoffier ***@***.***> a
écrit :
… It uses the same mapper. Mapper are heavy objects. We don't want to create
many of them.
—
Reply to this email directly, view it on GitHub
<#34329 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGGSLZRMRJX3MG664LAPLI3XNMRM3ANCNFSM6AAAAAAZVGGLPY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
So, you would need a separate mapper? |
It would be nice to be able to configure the mapper or set a bean
serializer like Spring with RedisTemplate
Le jeu. 29 juin 2023, 07:21, Clement Escoffier ***@***.***> a
écrit :
… So, you would need a separate mapper?
—
Reply to this email directly, view it on GitHub
<#34329 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGGSLZSBSVRPTG6NV2565ULXNUGFFANCNFSM6AAAAAAZVGGLPY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Yes, I was thinking about that. The memory cost is annoying. I am trying to see if Jackson has some hidden gems to avoid that. |
Ok... so I tried to customize the ObjectMapper, but it turned out to be a dead end. Thus, I implemented something I had wanted to do since day 1: custom codecs. You can now implement your own codec for a specific type. Implementations are beans, so it can get config values and other beans. |
Description
We should be able to customize serializers/deserializers for redis operations. This would allow to add type metadata in json (i.e. support generic objects in json).
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: