Skip to content
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

Codecs not 100% pluggable, hard dependency on Jackson #2309

Open
ThijsBroersen opened this issue Feb 8, 2021 · 3 comments
Open

Codecs not 100% pluggable, hard dependency on Jackson #2309

ThijsBroersen opened this issue Feb 8, 2021 · 3 comments

Comments

@ThijsBroersen
Copy link

As codecs for case class instances can be chosen (e.g. Jackson, Circe, Json4s) there is still a core dependency on Jackson.

I got the following error:
com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.11.4 requires Jackson Databind version >= 2.11.0 and < 2.12.0
Found the Jackson import in com.sksamuel.elastic4s.ResponseHandler

Can this also be made pluggable?

@KadekM
Copy link
Contributor

KadekM commented Mar 16, 2021

I'd also like to have this, but having to write all codecs seems like huge effort.

@ThijsBroersen
Copy link
Author

I'd like to understand why this hard dependency exists. Core libraries should/could be agnostic. In the code it looks like the 'elastic4s-json-jackson' module was written before most of the core code where later this jackson dependency was included.
I currently cannot bump some libraries to their latest versions because the latest elastic4s depends on a different version of jackson than those other libraries. If it was pluggable I could just switch to a different json-library.

@sksamuel
Copy link
Collaborator

You'd have to provide an implicit json serializer which we can do.
I'm working on a dotty compatible version of elastic4s right now, so I can incorporate this idea into the next major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants