https://kotlinlang.org logo
Title
k

K0NN4

06/19/2019, 2:28 PM
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

tseisel

06/19/2019, 2:35 PM
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

Melih Aksoy

06/19/2019, 3:24 PM
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

Kev

06/20/2019, 4:44 AM
Whats the performance difference between something like kotlinx.serialzation/ Gson/ Moshi?
m

Mohsen Shahini

06/20/2019, 7:19 AM
I recommend to use KSON
c

Carl Benson

06/20/2019, 7:30 AM