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

Create a stateful CBOR reader #32046

Closed
9 tasks done
bartonjs opened this issue Feb 10, 2020 · 1 comment
Closed
9 tasks done

Create a stateful CBOR reader #32046

bartonjs opened this issue Feb 10, 2020 · 1 comment
Assignees
Milestone

Comments

@bartonjs
Copy link
Member

bartonjs commented Feb 10, 2020

Create a reader for CBOR (Concise Binary Object Representation), as defined in IETF RFC 7049.

  • Initial implementation should be done directly into a test project
  • Assume a new, netstandard2.0-based package (hedged bet)
  • After the reader and writer are stable and feature complete, schedule an API review
  • After API review, and associated changes, split things into ref/src/test with the declared package.

Rough project plan (approximately a PR for each stage, and 3-5 days of work)

  • Support reading "unsigned" (positive) integers, negative integers, definite-length byte strings, definite-length text strings, as well as content-agnostic structure (e.g. "what kind of thing is next" and "skip this value").
  • Support reading definite length arrays.
  • Support reading definite length maps
    • Note that maps are like Dictionary<object, object>... key types are heterogeneous.
  • Support reading indefinite-length byte strings and text strings
    • Nesting is not permitted
  • Support reading indefinite-length arrays and maps
    • Nesting is permitted, but mean distinct objects.
  • Support reading major type 7 (float: half, single, double; boolean: true false; null; undefined; and "not yet defined" values
  • Support reading tags, especially with Skip and as map keys.
    • What does the read method return? Where is the reader positioned after reading the tag?
  • Support important tagged types
    • The two DateTimeOffset types
    • Maybe the two BigInteger types
    • The "Self-describing" type
  • Add support for reader "conformance levels" / "canonicalization modes"

The reader is needed before the writer, so writing/testing the writer should not hold up a functioning reader.

@eiriktsarpalis
Copy link
Member

Closing this issue as the implementation aspect of this work is done.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
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

4 participants