This library provides YAML parser and writer.
Reads YAML documents from the given textual input port in and returns a list of S-expression represented YAML documents.
The returning YAML documents are the compatible with vector JSON format described in (text json).
(yaml-read (open-string-input-port "
%YAML 1.2
---
foo: bar
boo:
- 1
- 2
- 3
- 4"))
'(#((foo . bar) (boo 1 2 3 4)))
Writes the given list of S-expression represented YAML documents yaml to the out.
If the first form is used, then it writes to (current-output-port)
.
(yaml-write '(#(("foo" . "bar") ("boo" 1 2 3 4))))
;; Prints the following
#|
%YAML 1.2
---
foo: bar
boo:
- 1
- 2
- 3
- 4
...
|#