erm sry to bother u again <@U0B8ZP13Q>, i got thi...
# klaxon
d
erm sry to bother u again @cedric, i got this error :
Copy code
com.beust.klaxon.KlaxonException: Couldn't find a suitable constructor for class User to initialize with {role=admin, id=1, username=admin}: java.lang.IllegalArgumentException method com.malvin.mmcanteen.login.User.<init> argument 1 has type java.lang.String, got java.lang.Integer
i just do it like how you teach, and the error happend when i run this code
Copy code
val json = Klaxon().parse<Data>(String(response.data))
                        session.run {
                            updateUsername(json?.user?.username)
                            updateRole(json?.user?.role)
                            updateUserID(json?.user?.id)
                            updateToken(json?.token)
                        }
Can u explain please? 😄