I noticed that Elasticsearch alpakka uses spray-json to serialize objects. ElasticsearchFlow.create, for example, needs implicit sprayJsonWriter: JsonWriter[T]
In our project we use Json4s and have lots of custom serializers for our custom types. I’m considering using Elasticsearch alpakka. So, my question is: is there a way I can use Json4s as a (de)serialization tool in Elasticsearch alpakka?
I think there is always an inefficient but working solution namely: .toString.parse
spray-json -> json4s => parse(sjson.toString)
json4s -> spray-json => render(j4sjson).parseJson
I think you can also write these to a SprayJsonFormatter, so it will happen implicitly.