CBOR library for the Crystal language. Similar to the JSON-mapping implementation.
Go to file
Alberto Restifo 547e8af2bd Start implementing from_cbor decoding 2020-04-23 00:25:11 +02:00
spec Start implementing from_cbor decoding 2020-04-23 00:25:11 +02:00
src Start implementing from_cbor decoding 2020-04-23 00:25:11 +02:00
.build.yml Work on lexer and diagnostic representation 2020-04-20 14:57:20 +02:00
.editorconfig Initialize library 2020-04-17 14:32:43 +02:00
.gitignore Initialize library 2020-04-17 14:32:43 +02:00
LICENSE Initialize library 2020-04-17 14:32:43 +02:00
README.md Document limitations 2020-04-22 22:31:00 +02:00
shard.yml Add repository details 2020-04-19 14:05:27 +02:00

README.md

CBOR

builds.sr.ht status

This library implements the RFC7049: Concise Binary Object Representation (CBOR) in Crystal.

Limitations

Maximum Array/String array/Bytes array length

The spec allows for the maximum length of arrays, string arrays and bytes array to be a UInt64.

While this library supports lengths expressed as a UInt64, it must not exceed Int32::MAX.

Diagnostic notation

While this library implements a diagnostic notation to be able to run against the examples provided in the RFC, the diagnostic notation is not fully spec-compliant:

  • Indefinite length items are not marked with the starting underscore but represented as their finite counterparts.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      cbor:
        git: https://git.sr.ht/~arestifo/crystal-cbor
    
  2. Run shards install

Usage

require "cbor"

TODO: Write usage instructions here

Development

TODO: Write development instructions here

Contributing

  1. Fork it (https://github.com/your-github-user/cbor/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors