Ktor parsing a map, similar to GSON
Ktor's ktor-serialization-kotlinx-json is not able to handle the maps parser, compare to GSON parser.
i.e -
Let's suppose the API response is -
Example
Activityformdata: {
activitydata: [ ],
activitydata_new: [ ]
}
Example
Activityformdata: {
activitydata: {
Existing asset: "no"
},
activitydata_new: {
Existing asset#SingleLineText: "no"
}
}
And the respective obj is -
@Serializable
data class ActivityFormData(
@SerialName("activitydata")
var mActivityData: LinkedHashMap? = null,...