charleskorn / kaml

YAML support for kotlinx.serialization
Apache License 2.0
490 stars 47 forks source link

Support FlowStyle.Flow to minify yaml #577

Open HalfLegend opened 2 weeks ago

HalfLegend commented 2 weeks ago

Describe the problem you'd like to solve

Kaml only support FlowStyle.Flow in sequence type. All other cases are FlowStyle.Block which contains a lot of indients which is space comsuming. I want to minify my yaml with FlowStyle.Flow

Describe the solution you'd like

Add an "FlowStyle" option to YamlConfiguration and pass the config directly to DumpSettings of the Emitter provided in snakeymal.engine

Describe alternatives you've considered

No response

Additional context

No response

charleskorn commented 2 weeks ago

Thanks for the suggestion @HalfLegend! If you're open to submitting a PR for this, I'd be happy to add this.