Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Standalone JavaScript YAML Parser & Encoder. You don't need any javascript framework to use it. Mainly inspired from sfYaml Library (part of the php Symfony components).

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.markdown

yaml.js

Standalone JavaScript YAML Parser & Encoder. You don't need any javascript framework to use it.

Mainly inspired from sfYaml Library (part of the php Symfony components).

How to use

Import yaml.js in your html page:

<script type="text/javascript" src="yaml.js"></script>

Parse yaml string:

nativeObject = YAML.decode(yamlString);

Load yaml file:

nativeObject = YAML.load('file.yml');

Load yaml file (asynchronous):

YAML.load('file.yml', function(result)
{
  nativeObject = result;
});

Dump native object into yaml string:

yamlString = YAML.encode(nativeObject);
Something went wrong with that request. Please try again.