-
Notifications
You must be signed in to change notification settings - Fork 584
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
tweak how we talk about data and datacontentencoding #484
Conversation
I've closed #471 since this is ultimately a cleaner solution to the set of problems we're having. This preserves the simplest case where Even though this PR abandons the abstract Generally, serializers are able to (de-)serialize a generic object graph for the respective runtime. An intermediary can therefore transcode the event if it reads it in one format and writes it in another and uses the respective serialization format's mapping to the runtime that is being used. Some of that might however be lossy. If I build an intermediary in C# and read a structure based on an event format that knows about timestamps, my resulting graph will contain DateTime. If I serialize that back out as JSON, which doesn't have a timestamp concept, the respective field will be a string, meaning that I lose the type information. I'm okay with a date turning into a string via intermediaries if I can be sure that the string has a predictable format. I want to avoid the situation where some implementations choose RFC1123 and others choose RFC3339 for dates, specifically in the chaotic world of JSON/JavaScript where RFC1123 dates are still common. Therefore, we should augment the JSON event format with a statement that any date and time expressions, anywhere and even inside |
For CloudEvents defined metadata (e.g. our I'm less clear on the idea of mandating what's inside of |
It may not be our problem to solve, but we could make interop a little easier by taking a stance. How about a SHOULD? :) |
To be clear... would you want to say that about just JSON or any format that uses structured? |
I think this is a great PR, @duglin, thanks for putting it together! |
💯 👍 Probably should have posted this comment here: #481 (comment) I still think we should give @jroper some credit, the idea is more-or-less the same as in #457 |
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.
+1
Two small nits/questions.
amqp-transport-binding.md
Outdated
@@ -237,7 +237,7 @@ content-type: application/cloudevents+json; charset=UTF-8 | |||
#### 3.2.2. Event Data Encoding | |||
|
|||
The chosen [event format](#14-event-formats) defines how all attributes, |
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.
Remove "," with a 2-clause "and"
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.
done
language/runtime types at the producer and consumer ends, and never materialize | ||
as a string. | ||
|
||
- `Boolean` - a boolean value of "true" or "false". |
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.
Did you mean to add Boolean
to the type system in this PR?
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.
yes I added it because someone may want to define an extension of type boolean. I pointed it out on the call and there was no objection.
Signed-off-by: Doug Davis <dug@us.ibm.com>
fixed comma issue per @evankanderson - ready for another review/check |
I still think we can clarify what In general, LGTM 👍 |
thanks @cneijenhuis merging. Approved on the 8/15 call. |
This might address #482 #471 #470
Signed-off-by: Doug Davis dug@us.ibm.com