EventStore / EventStoreDB-Client-Java

Official Asynchronous Java 8+ Client Library for EventStoreDB 20.6+
https://eventstore.com
Apache License 2.0
63 stars 20 forks source link

Improve Kotlin support #159

Closed nhajratw closed 1 year ago

nhajratw commented 2 years ago

Usage of Kotlin data classes for domain objects is very desirable as it provides immutability, etc.

Currently data classes cannot be used because the jackson deserialization process requires an empty default constructor.

The jackson-module-kotlin library provides just the hooks needed in order to get this working. It should just be a matter of adding the kotlin module if this library is detected on the classpath.

This is an example of how Spring Framework does it.

matthewadams commented 2 years ago

Given that this issue's title is "Improve Kotlin support", I might also request that you provide a Kotlin client that presents pure Kotlin idioms, delegating to the Java client. In particular, I'd be looking for support for Kotlin coroutines. If that merits its own issue, I'll happily create it.