Downloads of v 2.4.2


Average downloads per day


Last published

Share on Social Networks

License details

provided by Sonatype




A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 7049. According to that RFC, CBOR's data model "is an extended version of the JSON data model", supporting many more types of data than JSON. This implementation was written by Peter O. and is released to the Public Domain under the CC0 Declaration.

This implementation also doubles as a reader and writer of JSON, and can convert data from JSON to CBOR and back.

To install CBOR, run the following command in the Package Manager Console

Install-Package PeterO.Cbor

Release Notes

In version 2.4.2:
* Really use 0.2.2 of
  as dependency in NuGet package
In version 2.4.1:
* C# implementation now uses version 0.2.2 of
In version 2.4:
* The arbitrary-precision classes in this library are being replaced
with a new library (called PeterO.Numbers (https://www.nuget.org/packages/PeterO.Numbers) in C#).  As a result, most
of the methods in the existing classes are obsolete.  This affects the
classes `BigInteger`, `ExtendedDecimal`, `ExtendedFloat`, `ExtendedRational`,
`Rounding`, `PrecisionContext`, and `TrapException`.  Changes were made
to those classes to call the new classes, and the behavior is mostly
compatible with the previous behavior (with the notable exception
of a new dependency in the CBOR library).
* After version 2.3.1, the classes in the new library were greatly changed
from what they were in version 2.3.1.  Version 2.4.0 currently uses
version 0.2 of the new library, but this may change in future versions.  See the
  new library's release notes (https://github.com/peteroupc/Numbers),
and this repository's commit history (from "version 2.3.1"
to "move big number library...") for details.
* The FromObject method of the CBORObject class can now convert
arbitrary-precision number objects from the new library
appropriately, such as `EInteger` and `EDecimal`.  However, there are
no methods that directly take or return one of those classes, for
compatibility with version 2.0.
* Added Zero field and IsNegative property to the CBORObject class
* Added overloads to ReadJSON and FromJSONString in CBORObject class
* Added parameter in the ParseJSONNumber method of CBORDataUtilities
to preserve negative zeros
* Added CBOR decoding option to disable duplicate keys
* Fixed JSON parsing bugs
See the project page for release notes on previous versions: https://github.com/peteroupc/CBOR



Peter Occil


Written by Peter O. in 2013-2015. Any copyright is released to the Public Domain.



Version History

Version Downloads Last updated
CBOR 2.4.0 122 Thursday, February 11, 2016
CBOR 2.3.1 160 Monday, December 14, 2015
CBOR 2.2.0 446 Wednesday, April 22, 2015