Well there was no straightforward way to pass kotlinx json serializer to the elasticsearch transport to handle the serialization, but it would require a bit more implementing. Just wanted to see if somebody had done something like this with elasticsearch-java