Closed
Description
We like to encode objects and arrays to query parameters using YAML. The parser is able to parse this correctly:
But unfortunately, the dumper always adds unneeded spaces between array elements:
We don't encode []
for prettiness and browsers can handle them fine (PHP has used them forever), but spaces of course do need to be encoded, which is not very pretty.
Here are the options I am currently using to output single line YAML:
yaml.safeDump(value, { flowLevel: 0, indent: 0, lineWidth: Infinity, noCompatMode: true, sortKeys: true })
It would be great to have an option for omitting these non-required spaces / emitting "minimized" YAML.
Metadata
Metadata
Assignees
Labels
No labels