kotlinx.serialization.* is made for mapping JSON t...
# kotlin-native
n
kotlinx.serialization.* is made for mapping JSON to class structure. Are the ability to work with JSON in "dynamic" way like with Map instance? (for json's where json key's is dynamically generated on server) I DO NOT talk about streaming api.
g
I mean the receiver alternative
n
if you told about reviever parameter - is not what about I'm talking. All Json.parse functions return generic T type. is a result of mapping json to my internal class. I do not need this. I need Json.parse function return to me a Map or special Json class where I can iterate over keys and access to any key. like this:
j.getString("name_prop")
g
I don't think that kotlinx.serialization provides such API, you can use any Json library for C instead Also you can ask in #serialization
n
Okay, thanks. I will ask about it there
a
We have an in-house lib which does something like this: you give me a string, I give you a kotlin Map<*,
. Just add this to your gradle:`compile "nz.salect.objJSONobjjson jvm0.22"`. Then use it as `"JSON-STRING".instanceFromJson() as Map<
, *>`
n
jvm...