I am trying to show data from the server using data class of kotlin. It's almost working fine but some case whenever I fetch a response I don't know why it is still giving null values unless I add a default value (""
) for msg.
This is my data class
data class ViewcardModel( val msg: String = "", // here is default values val cartcnt: String = "", val order_total: Int = 0, val status: Boolean = false )
This is my response from server
{ status = false // server response }