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

.NET has a standard implementation now #87

Open
voronoipotato opened this issue Jun 2, 2022 · 2 comments
Open

.NET has a standard implementation now #87

voronoipotato opened this issue Jun 2, 2022 · 2 comments

Comments

@voronoipotato
Copy link
Contributor

voronoipotato commented Jun 2, 2022

https://docs.microsoft.com/en-us/dotnet/api/system.formats.cbor?view=dotnet-plat-ext-6.0

I wouldn't say its as feature full as the one you provided https://github.com/peteroupc/CBOR but it should be included so that people who aren't able or allowed to use external libraries will know that they can use CBOR in .NET now :).

@charlesroddie
Copy link

I wouldn't say that is an implementation. It's low-level code that could be used by an implementation.

For example, to write an array of values using that, you need to WriteStartArray() and then write the internals and then WriteEndArray(). So a user of this library needs to understand the low level workings of CBOR.

Unlike https://github.com/peteroupc/CBOR (CBORObject) which any developer can pick up and use, or the built in System.Text.Json.Nodes.JsonNode.

System.Formats.Cbor was implemented as part of COSE - CBOR Object Signing and Encryption and I believe having generally usable CBOR wasn't an objective. Is that correct @eiriktsarpalis ?

@eiriktsarpalis
Copy link

System.Formats.Cbor is a full implementation of the CBOR format, and does not constrain itself to COSE applications. It only surfaces low-level reader and writer types, but it should be possible to implement a type serializer on top of it: here's one that I wrote in F#.

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

No branches or pull requests

3 participants