I have issue when using Klaxon 5.5
Class :
data class QRResponse(
@field:SerializedName("qrType")
val qrType: String? = null,
@field:SerializedName("qrData")
val qrData: String? = null
)
Code :
val dataContents = result.contents
Log.d("ScanQRData", "result.contents : $dataContents")
val dataQR = Klaxon().parse<QRResponse>(dataContents)
Log.d("ScanQRData", "dataQR : $dataQR")
Result :
ScanQRData: result.contents : {“qrType”: “product”, “qrData”:“352307811”}
ScanQRData: dataQR : QRResponse(qrType=null, qrData=null)
Any suggestion what happened to qrType and qrData null after parse from Klaxon?