cl-BSON ยป Readtable

Package for optional BSON read-print functionality. Uses named-readtables for *readtable* manipulation.

Defines read-macros for #d()(literal <document>) and for #i()(literal <document>).

Also defines pprintint behaviour (for consistent read-print equivalence) for #d() and #i() read-macros in the bson-syntax readtable.

All of them are just optional. If you don't like, feel free to not use it =]

Usage

* (make-instance '<regex> :pattern "^abc$" :options "i")
; => #/^abc$/i
* (make-instance '<object-id>)
; => #i(90E08055616E64726568310C67E3D1)
* (make-document)
; => #d("_id" #i(9CE08055616E64726568310C68E3D1))

* (enable-printers)
; => NIL
* (make-instance '<regex> :pattern "^abc$" :options "i")
; => #/^abc$/i
* (make-instance '<object-id>)
; => #i(B4E08055616E64726568310C69E3D1)
* (make-document)
; => #d("_id" #i(B8E08055616E64726568310C6AE3D1))

* (named-readtables:in-readtable bson-syntax)
; big alist of readtables
* #/asdf/li
; => #/asdf/il
* #i(B4E08055616E64726568310C69E3D1)
; => #i(B4E08055616E64726568310C69E3D1)
* #d("my" "doc")
; => #d("my" "doc")

Printer

No node with name pprint-bson-document.
No node with name pprint-object-id.
No node with name enable-bson-document-printer.
No node with name enable-object-id-printer.
No node with name enable-printers.
No node with name disable-bson-document-printer.
No node with name disable-object-id-printer.
No node with name disable-printers.

Reader

No node with name bson-document-reader.
No node with name object-id-reader.
No node with name bson-document-literal.
No node with name repeated-keys-p.