~williewillus/racket-rfc8949

44c8873d94b2533aee49f7de5818383f2c2e3c02 — Vincent Lee 3 years ago 7980bda
Use list shorthand in decoder, update readme
2 files changed, 9 insertions(+), 9 deletions(-)

M README.md
M decode.rkt
M README.md => README.md +3 -3
@@ 3,9 3,9 @@
This package implements RFC 8949 (Concise Binary Object Representation) serialization routines for Racket.

The API is similar to the builtin `json` module, and provides two main functions:
`read-cbor` to read a CBOR value from a port, and `write-cbor` to write a CBOR value to a port.
`cbor-read` to read a CBOR value from a port, and `cbor-write` to write a CBOR value to a port.

As of 2021/04/07, a basic implementation of the deserializer is done. Further refinement, testing, and bugfixing is needed.
Have yet to do: serializer, documentation, better error handling.
As of 2021/04/15, a basic implementation of the deserializer and serializer is done. Further refinement of the API, testing, and bugfixing is needed.
Have yet to do: documentation, better error handling, better API

As such, this package is not recommended for use yet. When I feel it is ready, I will publish a 1.0 version on the package server.

M decode.rkt => decode.rkt +6 -6
@@ 205,12 205,12 @@
  (foldl (lambda (p config)
           (with-cbor-tag-deserializer config (car p) (cdr p)))
         empty-config
         (list (cons 2 deserialize-bignum)
               (cons 3 deserialize-bigneg)
               (cons 30 deserialize-rational)
               (cons #xffff deserialize-invalid-tag)
               (cons #xffffffff deserialize-invalid-tag)
               (cons #xffffffffffffffff deserialize-invalid-tag))))
         `((2 . ,deserialize-bignum)
           (3 . ,deserialize-bigneg)
           (30 . ,deserialize-rational)
           (#xffff . ,deserialize-invalid-tag)
           (#xffffffff . ,deserialize-invalid-tag)
           (#xffffffffffffffff . ,deserialize-invalid-tag))))
  
(define major-dispatch-table
  (vector-immutable