UNuX
09/02/2021, 2:34 PMSerializer for class 'null' is not found.
Robert Jaros
09/02/2021, 2:35 PMUNuX
09/02/2021, 2:37 PMfun addUser(systemUser: SystemUser): Promise<dynamic> {
println("Adding: $systemUser")
return RestClient().requestDynamic("/api/v1/users", systemUser) {
method = <http://HttpMethod.POST|HttpMethod.POST>
}
}
@Serializable
data class SystemUser (
var id: Int? = null,
@Contextual val creationDate: Date? = Date(),
val username: String,
val password: String? = null,
val permissionLevel: String
)
Adding: SystemUser(id=null, creationDate=Thu Sep 02 2021 16:36:47 GMT+0200 (Central European Summer Time), username=testadmin, password=test, permissionLevel=ADMIN)
main.bundle.js:2 Uncaught Mf {message: "Serializer for class 'null' is not found.\nMark the…erializable or provide the serializer explicitly.", cause: undefined, name: "Mf", stack: "Mf: Serializer for class 'null' is not found.\nMark… (<http://localhost:8080/main.bundle.js:2:2354664>)"}
Robert Jaros
09/02/2021, 3:06 PMDate
. https://kotlinlang.slack.com/archives/CL4C1SLKC/p1630240259020400?thread_ts=1630236437.018500&cid=CL4C1SLKCUNuX
09/02/2021, 3:06 PM