I’ve written a few web apps that use Kotlin on both server and browser side. Just about everything gets better with Kotlin, except one thing — I lose the easy serialization of
JSON.parse when I start using classes, enums, etc.
I guess my wish list has two similar but separate items …
- A way to stringify and parse JSON that creates the objects with the correct kotlin types.
- Something like
java.io.Serializable, but the browser side. It could allow more compact output than JSON, and handle more general object graphs. A server side library could allow passing objects between JS and JVM.