tryGet

inline fun <T> <Error class: unknown class>.tryGet(key: String, default: () -> T): T

Tries to get a value from a JSONObject by key, returning default if the key is not found. Usage:

obj.tryGet<String>("key") { "default" }

Since

0.46.0