So i have this problem where im asking for an array but im getting an object.
im getting some objects like this :
{
"2324": {
"Install_Date": "2013-11-28",
"LATITUDE": 0.51664504,
"LONGITUDE": 0.30964532,
"Module_Count": 14,
},
... and some more objects ...
}
Where the 2324 is dynamic, so it can change.
How can i get this data from retrofit ?
im using serialized and asking for a list of my Object that i created.
My custom object:
data class Asset(
@SerializedName("Install_Date")
val assetInstallDate: String,
@SerializedName("LATITUDE")
val LATITUDE: Double,
@SerializedName("LONGITUDE")
val LONGITUDE: Double,
@SerializedName("Module_Count")
val assetModuleCount: Int,
)
and my call is:
call.enqueue(object : Callback<List<Asset>>{
....
}