Hi everyone! :wave: I’m looking for a good KMP lib...
# multiplatform
d
Hi everyone! 👋 I’m looking for a good KMP library for reading the application configurations (yaml, properties, env etc) , I want to use it from the shared module, and the configs to be accessible in ios, android, server targets. I’m not sure how KMP works with resources yet, but I think it should be possible. Any suggestions are welcome, many thanks!
m
I just read all my configurations from a JSON file which I import via Kotlins serialization. So, I do not even need any 3rd party library for that.
👍🏻 1
d
@Michael Paus I will try this solutions, however I come from Java&Spring Boot world, they use .yaml and .properties often there, never thought about json, I will check it, thanks.
b
you can use kotlinx serialization for YAML also with https://github.com/charleskorn/kaml
👍🏻 1
don't know if there's one for properties files though
b
@jw isn't the built-in properties serializer just for doing conversion with a key-value structure, and not a serialized (on-disk) format though ?
j
Oh, weird. Why do they call it a format then. I've linked it multiple times not realizing...
b
Maybe someone wrote a serializer for it, wouldn't be too hard anyway, but I couldn't find it
Seems like it's tracked as an issue here https://github.com/Kotlin/kotlinx.serialization/issues/1152