Dahomey.Cbor
Dahomey.Cbor copied to clipboard
High-performance CBOR (RFC 8949) serialization framework for .Net (C#)
The current implementation of CborReader takes a `Span` of memory as the buffer. This however enforces that the data must be in one consecutive piece of memory. Adding support for...
Consider adding the following overloads to `CborWriter.WriteByteString`: ``` public void WriteByteString(int length) { WriteInteger(CborMajorType.ByteString, (ulong)length); } public void WriteByteString(ReadOnlySequence value) { WriteInteger(CborMajorType.ByteString, (ulong)value.Length); foreach (var segment in value) { _bufferWriter.Write(segment.Span);...
Hi Michaël, trying some days to get my head around a problem, but I'm pretty much stuck by now. There are the following json/cbor objects. ``` { "value": 0.567 }...
This fixes #95
Currently a call to `CborReader.SkipDataItem()` does not skip semantic tags like any other call to the reader (e.g. `ReadInt32`). This may lead to subtle errors where if a tag is...
This PR allows CborConverterAttribute to be attached on structs, interfaces and enums. Tests are included.
Currently, in DateTimeConverter, the DateTimeKind [is set to Local if no timezone is specified.](https://github.com/dahomey-technologies/Dahomey.Cbor/blob/master/src/Dahomey.Cbor/Serialization/Converters/DateTimeConverter.cs#L132) It would probably be more correct to let it be Unspecified. I know this is a...
It would be really useful if the `CborPropertyAttribute` could support an int key similar to the `KeyAttribute` in [MessagePack](https://github.com/neuecc/MessagePack-CSharp#quick-start). Edit: Mayby this is actually two feature requests: 1. CborProperty(x) should...
Consider this case: ``` public abstract record class Animal(DateTime Timestamp) { } [CborDiscriminator("dog")] public record class Dog(string Color, DateTime Timestamp) : Ingress(Timestamp) { // This example fails if this empty...
This disables constructor mapping for abstract types as it fails if an abstract base class has multiple constructors.