Hello, how would I get "url" out of Json like this...
# android
k
Hello, how would I get "url" out of Json like this with kotlin:``` { "meta": { "status": 200 }, "response": { "hits": [ { "highlights": [], "index": "song", "type": "song", "result": { "url": "https://genius.com/Lucidious-changes-lyrics",```
stackoverflow 1
t
That's not a Kotlin-specific question. You need to use a Java JSON library, the most used are Gson and Jackson. Or maybe you'd like to know if such libraries exist in pure Kotlin ?
m
I’d prefer Moshi over Gson or Jackson, also there’s kotlinx.serialization. https://github.com/Kotlin/kotlinx.serialization https://github.com/square/moshi
1
k
Whats the performance difference between something like kotlinx.serialzation/ Gson/ Moshi?
m
I recommend to use KSON
c