zio-config
zio-config copied to clipboard
Write back to Yaml similar to writing back to Json
We have a zio.config.typesafe package that can write back any config description to Json
.
We need the similar functionality for yaml, as currently zio-config can only read yaml, and cannot write back to yaml.
This will also turn out to be a simple tool for users to convert json to its yaml representation
Here are the example steps required to write a config back to its source.
- For typesafe-hocon config, we built a function that goes from
propertyTree
to `com.typesafe.config.Config,
https://github.com/zio/zio-config/blob/master/typesafe/shared/src/main/scala/zio/config/typesafe/TypesafeConfigSource.scala#L226
- Similary we need a function that goes from
PropertyTree
toYamlConfig
.
This means you can imagine every config in various libraries can be turned to a PropertyTree.
I'll work on this one
Thanks @co0lster