Open
Description
I need to convert "almost plain" objects to YAML. By "almost plain" I mean they're just data containers as if they were created by literals, but with different names. E.g. output of the protagonist library.
However, js-yaml
fails on those with unacceptabe kind of an object to dump [object Result]
. There could be an option to treat those as plain objects (json2yaml does this by default).
Workaround for this is to do
var yamlResult = yaml.safeDump(JSON.parse(JSON.stringify(result)));
...but that's not very efficient.