Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Javascript JSON to YAML converter
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
test
LICENSE
README.md

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
Something went wrong with that request. Please try again.