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

Does Cbor support schema evolution? #40

Open
kant111 opened this issue Dec 19, 2017 · 1 comment
Open

Does Cbor support schema evolution? #40

kant111 opened this issue Dec 19, 2017 · 1 comment

Comments

@kant111
Copy link

kant111 commented Dec 19, 2017

Can a writer and reader have different schema ?

@ii8
Copy link

ii8 commented Jan 11, 2018

yes.

If the writer has this CDDL schema:

something = {
  member: bool,
  member2: uint
}

and the reader has one like this

something = {
  member: bool
}

then the reading implementation can access member without issue.
There may be caveats depending on the implementation, for example if your decoder checks that the incoming data contains nothing extra to what is defined in the scheme then naturally this wont work.
And other common sense stuff like indices in arrays can't change etc.

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

2 participants