can I get a generic json object from a ktor-client call? Like I don’t know exactly what do endpoint will return, but I know for a fact that it has an
id
field and that’s all I need. I wanted to just
response.body()[id]
is that possible?
l
Landry Norris
10/18/2022, 7:28 PM
If that’s the case, you could make sure to set ignoreUnknownKeys when you create the json object, then create a serializable class with a single field id.
j
João Gabriel Zó
10/18/2022, 7:30 PM
great, I was thinking about something like that. Thanks!