Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 917 Bytes

ReadMe.md

File metadata and controls

51 lines (34 loc) · 917 Bytes

YAMLStar - Clojure

A pure YAML 1.2 loader for Clojure.

Installation

Leiningen/Boot

[org.yamlstar/yamlstar "0.1.28"]

Clojure CLI (deps.edn)

org.yamlstar/yamlstar {:mvn/version "0.1.28"}

Usage

(require '[yamlstar.core :as yaml])

;; Load single document
(yaml/load "key: value")
;=> {"key" "value"}

;; Load multiple documents
(yaml/load-all "---\ndoc1\n---\ndoc2")
;=> ["doc1" "doc2"]

;; Load with a YAML parser plugin (see https://yamlstar.org/plugins/)
(yaml/load "key: value" {:plugin {:yaml-parser {:name "snakeyaml"}}})
;=> {"key" "value"}

Publishing to Clojars

To publish a release, add credentials to ~/.yamlstar-secrets.yaml:

clojars:
  user: <clojars-username>
  token: <clojars-deploy-token>

Then run: make release-clojure from the repository root.

License

MIT License - See License for details.