Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
YAML encoding and decoding for Clojure via SnakeYAML
branch: master

This branch is 14 commits behind lancepantz:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/clj_yaml
test/clj_yaml
.gitignore
README.md
project.clj

README.md

clj-yaml provides YAML encoding and decoding for Clojure via the SnakeYAML Java library.

Usage

(require '[clj-yaml.core :as yaml])

(yaml/generate-string
  [{:name "John Smith", :age 33}
   {:name "Mary Smith", :age 27}])
"- {name: John Smith, age: 33}\n- {name: Mary Smith, age: 27}\n"

(yaml/parse-string "
- {name: John Smith, age: 33}
- name: Mary Smith
  age: 27
")
=> ({:name "John Smith", :age 33}
    {:name "Mary Smith", :age 27})

Installation

clj-yaml is available as a Maven artifact from Clojars:

:dependencies
  [["clj-yaml" "0.3.0-SNAPSHOT"]
   ...]

Development

$ git clone git://github.com/lancepantz/clj-yaml.git
$ lein deps
$ lein test
$ lein install
Something went wrong with that request. Please try again.