I use the yaml
library to serialize a value of type Map String t
(or some type t). The order in the resulting output is rather random, which is suboptimal, as the file should be human readable.
Is there a way to control the serialization order of a map? Or, probably closer to the core of the problem, an aeson Object
? If not, what are suitable workarounds?
With yaml
, or aeson
on which it is based, it is currently not easily possible, says the yaml
author, but he has started some experimental support for it in the form of the Data.Yaml.Builder module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With