i use a javascript object as a "Map<String, Som...
# javascript
t
i use a javascript object as a "Map<String, Someobject>" to make integration easier for the frontend team. what type would you suggest i declare in kotlin here? currently its just
dybamic
which obviously makes handling hard in kotlin itself
d
A first step would be to use
Json
, which represents a plain old JS object in Kotlin
You still have
Any?
for values, but it's an improvement
t
how could
Json
help me here?
d
Well, then you have
get
and
set
operator functions instead of just
dynamic
, which allows everything
t
ah i see
at least it looks slightly better. thank you 🙂