JuliaIO / CBOR.jl

A Concise Binary Object Representation (RFC 7049) serialization library in Julia
MIT License
19 stars 13 forks source link

Fix encode/decode of unsigned and negative numbers, see also #20 #22

Open attdona opened 1 year ago

attdona commented 1 year ago

Actually both positive and negative values of signed integers are encoded/decoded as major type 1, causing interoperability problems with cbor libraries implemented in other languages.

This patch is for compliance with RFC8949: positive integers as major type 0 and negative integer as major type 1.