- yaml-dump object #!optional portprocedure
Serialize object to its YAML representation. If the output port port is given, write it to that port, otherwise return a string.
Example:
#;1> (import yaml sql-null) #;2> (yaml-dump "foo") "--- foo\n" #;3> (yaml-dump 'bar) "--- :bar\n" #;4> (yaml-dump (sql-null)) "---\n" #;5> (yaml-dump '("foo" ("bar"))) "---\n- foo\n- - bar\n" #;6> (yaml-dump '(("foo" . "bar"))) "---\nfoo: bar\n" #;7> (yaml-dump '(("foo" . "bar") ("bar" . "baz"))) "---\nfoo: bar\nbar: baz\n" #;8>