Skip to content
This repository has been archived by the owner on Aug 15, 2021. It is now read-only.

(De)serialize 128 bit integers #77

Open
AregevDev opened this issue Oct 9, 2018 · 6 comments
Open

(De)serialize 128 bit integers #77

AregevDev opened this issue Oct 9, 2018 · 6 comments

Comments

@AregevDev
Copy link

The program crashes when trying to serialize them, complaining i/u128 is not supported
Serde itself already has support for that

@pyfisch
Copy link
Owner

pyfisch commented Oct 9, 2018

AFAIK neither the CBOR RFC 7049 nor an extension in CBOR supports 128 bit numbers. (big decimals are supported by the standard but not by this crate) If you need 128 bit integers I suggest to serialize them as a slice.

@AregevDev
Copy link
Author

Oh, didn't know that, started working on PR, never mind

@dtolnay
Copy link

dtolnay commented Oct 9, 2018

The program crashes when trying to serialize them

Is this a crash or does serde_cbor return an error?

@AregevDev
Copy link
Author

cbor returns an error

@pyfisch pyfisch changed the title Support for 128 bit integers? (De)serialize 128 bit integers Dec 29, 2018
@nhynes
Copy link
Contributor

nhynes commented Sep 6, 2019

related: #145

@surban
Copy link

surban commented Jul 8, 2021

MsgPack stores u128/i128 as a byte array. I think it would be a simple fix for serde_cbor to do the same?

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

No branches or pull requests

5 participants