Related to #367, there are also a number of cases where the expected parsing is not spelled out today. I volunteer the following HTTP binary mode object for consideration:
POST / HTTP/1.1
Content-Type: text/xml
CE-Extension: foo
CE-Extension-Key1: bar
CE-Extension-Key2: baz
CE-SpecVersion: 0.2
CE-Cloudeventsversion: v0.1
CE-Source: https://jackboxgames.com/project/you-dont-know-jack-party/
CE-Type: u(dont-know-jack)
CE-ID: ""😊
Content-Length: 19
<much wow=\"xml\"/>
I believe this should correspond to a JSON object like the following:
{
"specversion": "0.2",
"source": "https://jackboxgames.com/project/you-dont-know-jack-party/",
"type": "u(dont-know-jack)",
"id": "\"\"😊",
"extension": "foo",
"cloudeventsversion": "v0.1",
"contenttype": "text/xml",
"data": "<much wow=\\\"xml\\\"/>"
}
Note that the extension map keys were silently dropped; a different definition would be to discard the value "foo". Additionally, the actual "data" content is actually invalid XML, if I recall my XML correctly.
Related to #367, there are also a number of cases where the expected parsing is not spelled out today. I volunteer the following HTTP binary mode object for consideration:
I believe this should correspond to a JSON object like the following:
{ "specversion": "0.2", "source": "https://jackboxgames.com/project/you-dont-know-jack-party/", "type": "u(dont-know-jack)", "id": "\"\"😊", "extension": "foo", "cloudeventsversion": "v0.1", "contenttype": "text/xml", "data": "<much wow=\\\"xml\\\"/>" }Note that the
extensionmap keys were silently dropped; a different definition would be to discard the value"foo". Additionally, the actual "data" content is actually invalid XML, if I recall my XML correctly.