JSON/Object to YAML?
Opened this issue · 1 comments
Deleted user commented
Is it possible to convert a JSON or Javascript object into YAML?
coolaj86 commented
I just wrote a stringifier and a cli for both the parser and the stringifier.
npm install -g json2yaml yaml2json
Example:
(function () {
"use strict";
var YAML = require('json2yaml')
, ymlText
;
ymlText = YAML.stringify({
"foo": "bar"
, "baz": "corge"
});
console.log(ymlText);
}());