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

data/datacontenttype clarifications (alternative) #471

Closed
wants to merge 1 commit into from

Conversation

clemensv
Copy link
Contributor

I had typed a bunch of normative-style text into the comments of #470 and now chose to break that out into a separate and alternative PR here, and I also amend the primer to explain the 3 event model scenarios (as Tim Bray pointed out on Thursday's call) for further clarification of why we have these options.

@jroper @duglin

Signed-off-by: Clemens Vasters <clemensv@microsoft.com>
@clemensv clemensv force-pushed the data-clarification branch from fc6cd17 to 6bf2b28 Compare July 12, 2019 10:47
@duglin
Copy link
Collaborator

duglin commented Jul 15, 2019

@jroper what are your thoughts on this?

@duglin duglin added the v1.0 label Jul 15, 2019
spec.md Show resolved Hide resolved
accurate media-type. If no IANA registered media-type is available, a vendor
extension or application/octet-stream MAY be used.

The attribute SHOULD be set for String content in the data field. If set, the
Copy link
Contributor

@cneijenhuis cneijenhuis Aug 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CloudEvents-String is defined as "Sequence of printable Unicode characters". That (probably) makes sense for a regular attribute, but for data?

If a publisher wants to send text-data that (potentially) contains line breaks, they can use Binary, but will still declare text/plain. How can a consumer decide if it's a String or a Binary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correcting myself: The publisher doesn't want to use Binary, because then they have to base64 encode.

I guess it is out of scope for this PR, but I suggest we split String into two parts: The String we need as an identifier for the Map, and the String we want to use for attributes. The latter should not be constraint to printable characters IMO. We could also further constrain the Map-String type (e.g. SHOULD follow the same pattern for attribute names).

@clemensv
Copy link
Contributor Author

Closing in support of #484

@clemensv clemensv closed this Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants