Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

CircleCI-Archived/clj-yaml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This respository was originally a fork of the original and is no longer being maintained. The project is now a part of clj-commons.

circleci/clj-yaml provides YAML encoding and decoding for Clojure via the snakeyaml Java library.

Clojars Project cljdoc badge CircleCI Status

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})

By default, keys are converted to clojure keywords. To prevent this, add :keywords false parameters to the parse-string function:

(yaml/parse-string "
- {name: John Smith}
" :keywords false)

Installation

circleci/clj-yaml is available as a Maven artifact from Clojars.

Leiningen/Boot

[circleci/clj-yaml "0.6.0"]

Clojure CLI/deps.edn

circleci/clj-yaml {:mvn/version "0.6.0"}

Development

$ git clone git://github.com/circleci/clj-yaml.git
$ lein deps
$ lein test
$ lein install

About

YAML encoding and decoding for Clojure via SnakeYAML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 51.7%
  • Clojure 39.1%
  • Java 9.2%