How to create a JSONObject from String in Kotlin?

Perhaps I’m misunderstanding the question but it sounds like you are already using org.json which begs the question about why

val answer = JSONObject("""{"name":"test name", "age":25}""")

wouldn’t be the best way to do it? What was wrong with the built in functionality of JSONObject?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)