https://kotlinlang.org logo
#javascript
Title
# javascript
j

Joshua Hansen

09/23/2022, 8:13 AM
I'm working with a large API which returns JSON response data. If I don't want to make wrapper classes for all the possible API response formats, is the best way to just use
Copy code
val data = getData().await().asDynamic()
val someJsonProp = data.propName as Int
Or is there a better way?
b

Big Chungus

09/23/2022, 10:33 AM
I'd unsafeCast() it to Json type for map-like access
2 Views