Javascript JSON to YAML converter
JavaScript
Switch branches/tags
Nothing to show
Latest commit ae4ad8d Feb 21, 2013 @jeffsu Merge pull request #2 from layerssss/master
fails when converting unicode chars.
Permalink
Failed to load latest commit information.
src support for unicode chars and more test cases. Nov 5, 2012
test support for unicode chars and more test cases. Nov 5, 2012
LICENSE adding license Apr 27, 2012
README.md updating docs Aug 19, 2011

README.md

json2yaml

Converts json or simple javascript objects into a yaml format.

Installation

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

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

This outputs

hello: world
hello2:
  - hello
  - world