Enhancement: Allow compact one-line representation of some fields
nyurik opened this issue · comments
Yuri Astrakhan commented
In some cases, the author may know for sure that the structure of a field will be compact enough to be representable as a one-liner:
name: My geometries
bounds: [ -10, -23, 15, 22 ]
tags: [tag1, tag2]
The bounds
field is known to always have four numbers, so it would be good to force serde to NOT serialize it like this:
name: My geometries
bounds:
- -10
- -23
- 15
- 22
tags:
- tag1
- tag2
David Tolnay commented
I do not plan to support this in this crate, but someone else should feel free to pursue creating a more fully-featured YAML library that could serve this use case.