-
Notifications
You must be signed in to change notification settings - Fork 99
Require Canonical JSON for bundle.json #73
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
Conversation
@@ -2,6 +2,10 @@ | |||
|
|||
This section describes the format and function of the `bundle.json` document. | |||
|
|||
The `bundle.json` file is a representation of bundle metadata. It MUST be represented as [Canonical JSON](http://wiki.laptop.org/go/Canonical_JSON). While Canonical JSON is parseable by any JSON parser, its serialized form is consistent. This is a necessity when comparing two textual representations of the same data (such as when hashing). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add appropriate verbiage around whether or not tooling should error if the bundle.json is not represented in the correct format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is tricky. I haven't seen any Canonical JSON parsers that actually verify that the content it parses is canonical. But we could certainly add a MAY line in here.
What are the implications of merging this change? In my mind they are benign in the short-term although should tools error if bundle.json is non-compliant given this change? |
Yeah, so my thought is that since Canonical JSON parsers don't appear to error out if the JSON is not perfectly canonical (e.g. "non-validating parsers"), this change actually impacts generators first. So we can ease our way into it. |
e4a2153
to
4d42981
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (with a rebase).
Closes cnabio#72 Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
This changes the image references to the new format. Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4d42981
to
184258c
Compare
Closes #72
Signed-off-by: Matt Butcher matt.butcher@microsoft.com