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

Decouple micronaut-elasticsearch from jackson #269

Open
yawkat opened this issue Jan 11, 2022 · 1 comment
Open

Decouple micronaut-elasticsearch from jackson #269

yawkat opened this issue Jan 11, 2022 · 1 comment

Comments

@yawkat
Copy link
Member

yawkat commented Jan 11, 2022

Issue description

See also: micronaut-projects/micronaut-serialization#39

@MT-Jacobs
Copy link

Here's a snippet of conversation about this from an earlier PR: #264 (comment)

One interesting thing is that Elasticsearch's RestClientTransport class requires a JsonpMapper, an elasticsearch-java interface:

https://github.com/elastic/elasticsearch-java/blob/0aecc5a/java-client/src/main/java/co/elastic/clients/transport/rest_client/RestClientTransport.java#L100-L108

The two implementations of JsonpMapper require an ObjectMapper:

https://github.com/elastic/elasticsearch-java/blob/c475ee6/java-client/src/main/java/co/elastic/clients/json/jackson/JacksonJsonpMapper.java

and a JsonProvider:

https://github.com/elastic/elasticsearch-java/blob/c475ee6/java-client/src/main/java/co/elastic/clients/json/jsonb/JsonbJsonpMapper.java

There are a couple of directions we could go here off the top of my head:

  1. Provide our own implementation of JsonpMapper, either in elasticsearch-java, or here. If we're truly going to decouple from Jackson we'd likely want to tie it to JsonMapper, though that would require a custom implementation here rather than in elasticsearch-java.
  2. Provide a converter from JsonMapper to JsonProvider, then use that to construct a JsonbJsonpMapper.

@timyates timyates removed their assignment May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

No branches or pull requests

3 participants