How can I do JSON serialization using Compose for ...
# compose-web
h
How can I do JSON serialization using Compose for web, I've tried Kotlinx serialization it results in a error, I've resorted to using
js("JSON.stringify(s)")
but this seems to have a few problems, namely the incorrect naming of properties.
e
what did you run into with kotlinx.serialization? there was https://github.com/Kotlin/kotlinx.serialization/issues/968 preventing simultaneous use of Compose and kotlinx.serialization in the same module, but that could be avoided by splitting modules and should be resolved in any recent version.
r
That issue is resolved, but there's still issues that require splitting, see https://github.com/Kotlin/kotlinx.serialization/issues/1454
h
I've tried to create a different module to use serialization, but it does not seem to be working at all, can someone provide a working example?
h
b
@Hugo Miguel Coutinho Dias btw, you don’t need js function for access to
JSON
, just write
JSON.stringify(s)