Liking cljdoc? Tell your friends :D

Change Log

All notable changes to this project will be documented in this file, which follows the conventions of keepachangelog.com. This project adheres to Semantic Versioning.

Unreleased

...

0.6.0 - 2017-12-23

Changed

  • Upgrade to Clojure 1.9.0.

0.5.0 - 2017-11-08

This release fixes two of the longer-standing quirks with the library, which were unfortunately breaking changes. The fixes should be straightforward:

  • Replace any (cbor/decode ...) with (cbor/decode-seq ...).
  • Replace any (first (cbor/decode-seq ...)) with (cbor/decode ...).

If you have existing encoded data containing sets, you can use the following function to rewrite it:

(defn rewrite-cbor-sets
  [codec source dest]
  (with-open [input (io/input-stream source)
              output (io/output-stream dest)]
    (->>
      input
      (cbor/decode-seq (assoc codec :set-tag 13))
      (cbor/encode-seq codec output))))

If rewriting isn't an option, you can support reading sets via tag 13 by using a custom read handler:

(def compatible-codec
  (assoc-in cbor/default-codec [:read-handlers 13] set))

Changed

  • Breaking: the default set tag is now 258, matching the IANA registry. #6
  • Breaking: clj-cbor.core/decode now only decodes a single value; previous behavior moved to decode-seq. #7

Added

  • clj-cbor.core/encode-seq writes a sequence of values to a byte array or output stream.
  • clj-cbor.core/spit-all similarly writes a sequence of values to an output file like repeated calls to spit with :append true.

0.4.1 - 2017-05-17

Fixed

  • Resolved an overflow issue when encoding Long/MIN_VALUE.
  • Integer values are always decoded as Long values, no matter their encoded size. Previously, numbers between Short/MAX_VALUE and Integer/MAX_VALUE would return Integer values. #4 #5

0.4.0 - 2017-03-14

Added

  • Implemented canonical mode sorting of map keys and set entries.

0.3.0 - 2016-01-05

Added

  • Support self-describe CBOR tag 55799. This provides a 'magic' three-byte sequence to simplify detection of the CBOR format. The clj-cbor.core/self-describe function will wrap the given value with this tag.
  • Tag codes have been factored out into integer constants where appropriate to improve consistency.
  • Add spit, slurp, and slurp-all utility functions to the core namespace.

Changed

  • Read handler functions are no longer called with the tag. This greatly simplifies their implementation and allows for reuse of existing transformation functions as-is.
  • Error type :clj-cbor.codec/illegal-chunk renamed to illegal-chunk-type.

Fixed

  • The decode function now properly raises an error when the input ends mid-value rather than at a top-level value boundary.

0.2.0 - 2016-12-28

This release includes 100% test coverage!

Added

  • UUIDs are supported in binary form using tag 37.
  • CBOR error keywords are organized into a hierarchy underneath :clj-cbor.error/encoding-error and :clj-cbor.error/decoding-error.

Changed

  • clj-cbor.data.model renamed to clj-cbor.data.core.
  • The clj-cbor.float16 functions from-bits and to-bits renamed to decode and encode, respectively.
  • Undefined and SimpleValue records moved to new clj-cbor.data.simple namespace.
  • TaggedValue record moved to new clj-cbor.data.tagged namespace.
  • clj-cbor.header/write-major-int renamed to write.
  • clj-cbor.header/read-size renamed to read-code.

Fixed

  • Generally tighted up namespaces and reduced linkage where possible.

0.1.0 - 2016-12-23

Initial project release.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close