clovyr / aeson-yaml

Encode any Aeson (JSON) value as YAML (in pure Haskell)
https://hackage.haskell.org/package/aeson-yaml
BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

[Bug] Empty lists are encoded as list with one null #2

Closed akshaymankar closed 4 years ago

akshaymankar commented 4 years ago

Example:

This code:

Data.Aeson.Yaml.encode (object ["foo" .= ([] :: [Int])])

would make a YAML which looks like this:

foo:
  -

It should be like this:

foo: []
patrickmn commented 4 years ago

Thank you. Fixed in https://github.com/clovyr/aeson-yaml/commit/ceb8d53e1a84cb07447c651762f83405673127ea and released as aeson-yaml 1.0.3.0.