Yes, I know nothing about the Kotlin Javascript compiler. It would be nice to make Klaxon compatible with it but I have no idea what needs to be done right now.
I know this is an old question, but I thought I’d mention my solution: all my objects implement toJSON() metod, which returns their JSON representation, so in the case mentioned in this question User class in Kotlin would be:
class User(val name: String, val age: Int) {
fun toJSON(): String {
return "{\"name\": \"$name\", \"age\": $age}"
}
}
and in JavaScript you would call:
var user = new module_name.package_name.User('forinil2', 15)
save(user.toJSON())
Can someone convert the code from native to the current external way of doing things? I’m a bit confused by some things like how to specify (“Object”) and js.noImpl