Javascript JSON to YAML converter
Switch branches/tags
Nothing to show
Clone or download
jeffsu Merge pull request #4 from levindoneto/master
Add square brackets in case of empty object
Latest commit 86fe4f2 Jan 1, 2018
Failed to load latest commit information.
src Add square brackets in case of empty object Dec 29, 2017
test support for unicode chars and more test cases. Nov 5, 2012
LICENSE adding license Apr 27, 2012 updating docs Aug 19, 2011


Converts json or simple javascript objects into a yaml format.


Include json2yaml.js (in src directory) via script tag and then run:

var obj  = { hello: 'world', hello2: [ 'hello', 'world' ] };
var yaml = json2yaml(obj);

This outputs

hello: world
  - hello
  - world