Outdated egg!
This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
edn.egg
EDN data reader/writer
EDN
This egg provides a parser and a writer for the Extensible Data Notation.
Documentation
Reading EDN
tag-handlers
[constant] tag-handlers → (list (cons _: (lambda (input) edn/omit:)))An a-list containing the handlers for reader tags. You can register your own reader tags by simply adding a new a-list entry.
Example for a tag "#keywordify": add the entry `(cons keywordify: keywordify-procedure)`.
(define tag-handlers (list (cons _: (lambda (input) edn/omit:))))
read-edn
[procedure] (read-edn) → unspecifiedReads EDN data from the `current-input-port`, converts it to Chicken data and returns it. Precision suffixes for numbers get ignored, maps get converted to SRFI-69 hashtables, vectors to SRFI-4 vectors.
(define (read-edn) (second ((parse-edn '()) (current-input-port))))
Writing EDN
write-edn
[procedure] (write-edn struct) → unspecifiedConverts Chicken data structures to EDN and writes it to the `current-output-port`.
- struct
- A Chicken data structure consisting of atoms, lists, vectors and hashtables.
(define (write-edn struct)
(lambda () (display (parse-entry struct) (current-output-port))))
About this egg
Author
License
BSD
Dependencies
Colophon
Documented by hahn.