Has anyone written a multiplatform Kotlin library ...
# javascript
a
Has anyone written a multiplatform Kotlin library that's designed to be consumed from JS? How do you deal with the fact that in order to feel fluent, JS developers want your methods to accept/return values that are JS blobs (aka
Json
), but as a Kotlin developer, you want to use real Kotlin class instances internally? I currently have a JS-specific wrapper around my entire API that just converts enums to/from `Integer`s and `String`s, and class instances to/from
Json
, but that's all entirely handwritten. Is there an easy way to convert between real class instances and
Json
, or is this something you manually have to do everywhere real JS expects to interact with your code?