libyaml

Read or dump yaml.

Repository is in:

Note that this page may be out of date. The latest exact document should be deployed as part of the repository:

Read the documents in the repository for futher help.

Requirememnts

varg

Simple examples

Reading yaml

Use yaml<- procedure for reading yaml.

(yaml<- "--- 1\n--- 2\n...") ;will return a procedure
((yaml<- "--- 1\n--- 2\n...")) ;will return 1
((yaml<- "--- 1\n--- 2\n...") 0) ;will return 1
((yaml<- "--- 1\n--- 2\n...") 1) ;will return 2
((yaml<- "--- 1\n--- 2\n...") -1) ;will return '(1 2)
((yaml<- "--- 1\n--- 2\n...") 2) ;will abort by exception
(yaml<-) ;will try to read yaml from (current-input-port) and return a procedure

For more element, such as yaml-list, yaml-mapping, refer to:

Dumping yaml

Use <-yaml procedure for dumping yaml.

(<-yaml #:strict-input (yaml<- "[1]"))
(<-yaml ((yaml<- "[1]")))
(<-yaml #("1st" ()))
(<-yaml `(#:port . ,(current-output-port))
  ((yaml<- "---\n---\n---\n[1,2,3]") 2))