Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoder unpredictably returns non-Long types when decoding integers #4

Closed
aengelberg opened this issue May 12, 2017 · 0 comments
Closed
Assignees
Labels

Comments

@aengelberg
Copy link

user=> (into {} (map (juxt identity (comp type first cbor/decode cbor/encode))) [0 1 23 24 255 256 65535 65536 1000000 (inc' Long/MAX_VALUE)])
{0 #class java.lang.Long,
 1 #class java.lang.Long,
 23 #class java.lang.Long,
 24 #class java.lang.Integer,
 255 #class java.lang.Integer,
 256 #class java.lang.Integer,
 65535 #class java.lang.Integer,
 65536 #class java.lang.Long,
 1000000 #class java.lang.Long,
 9223372036854775808N #class clojure.lang.BigInt}

Similarly, if a tagged CBOR type wraps an integer, its read handler may receive either an Integer, Long, or BigInt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants