-
Notifications
You must be signed in to change notification settings - Fork 25
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
custom serialization not working #122
Comments
can you share you connect-store call and serializer? |
I worked arround it by creating bytes first via nippy, and save those via konserve. Lets see if find the code back. |
If you want to add a serializer you need to open a PR. The serializer are internally mapped into a lookup table like this to allow store schema updates for konserve, that is why adding it to the codebase is reasonable. Nippy would definitely be nice to have for the JVM. I focused on formats that also work in JS so far, but not everybody needs that. |
Thnaks, I thought so after reading code. konserve/doc/api-walkthrough.md Line 64 in 32b7f25
"custom serializer" sounds like "custom defrecord", while you mean "custom configuration/handler" |
To add "nippy" would be nice, but needed to be very configurable. |
So you are saying that this cannot be passed in as a read and write handler to the serializer? Currently it works by defining stateless serializer constructors, but they then can be parametrized by such custom handling code. The reason for this is that konserve allows to change serializers without having to reserialize the whole store. It keeps a mapping per key to make sure that a value can always be read, even if the store serializer was different when it was written. You still need to provide the handlers though if you want it to be read in particular way. |
I tried to plugin my own custom serailisation using nippy as documented here:
https://github.com/replikativ/konserve/blob/main/doc/api-walkthrough.md#connecting-stores
but I got an NPE, which seems to related to this line:
konserve/src/konserve/serializers.cljc
Line 79 in 8e96b46
which seems to list all potential classes implementing PStoreSerializer
I get a nil here:
konserve/src/konserve/impl/storage_layout.cljc
Line 26 in 8e96b46
as now serializer-id is found for my own class.
The text was updated successfully, but these errors were encountered: