form-conductor
form-conductor copied to clipboard
Incompatible with kotlinx-serialization
import com.boe.itc.b4client.utlis.Required
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import me.naingaungluu.formconductor.annotations.Form
@Form
@Serializable
data class User(
@SerialName("userId")
@Required("User ID is required")
val userName: String = "",
@SerialName("password")
@Required("Password is required")
val password: String = ""
)
Use kotlinx-serialization will report errors
java.lang.IllegalArgumentException: Form data class 'User' needs to have a default constructor parameters.
Following parameters need to have a default value in the constructor:
[seen1, userName, password, serializationConstructorMarker]
Use moshi is OK, But still hope to support kotlinx-serialization
@bwmgd It must be due to the way kotlinx-serialization is generating the constructors.
I'll look into it and give you an update!
Thank you very much, it's a great library. Hope to keep updating it.