diff --git a/amqp-format.md b/amqp-format.md index 3dd1d79db..6bce1f571 100644 --- a/amqp-format.md +++ b/amqp-format.md @@ -56,7 +56,7 @@ exceptions noted below. | CloudEvents | AMQP | | ------------- | --------------------------- | | String | [string][amqp-string] | -| Integer | [long][amqp-long] | +| Integer | [string][amqp-string] | | Binary | [binary][amqp-binary] | | URI-reference | [string][amqp-string] | | Timestamp | [timestamp][amqp-timestamp] | diff --git a/amqp-transport-binding.md b/amqp-transport-binding.md index 372528117..b13f5e2a8 100644 --- a/amqp-transport-binding.md +++ b/amqp-transport-binding.md @@ -201,11 +201,11 @@ content-type: application/json; charset=utf-8 ----------- application-properties ----------- -cloudEvents:specversion: "0.3-wip" -cloudEvents:type: "com.example.someevent" -cloudEvents:time: "2018-04-05T03:56:24Z" -cloudEvents:id: "1234-1234-1234" -cloudEvents:source: "/mycontext/subcontext" +cloudEvents:specversion: 0.3-wip +cloudEvents:type: com.example.someevent +cloudEvents:time: 2018-04-05T03:56:24Z +cloudEvents:id: 1234-1234-1234 +cloudEvents:source: /mycontext/subcontext .... further attributes ... ------------- application-data --------------- diff --git a/http-transport-binding.md b/http-transport-binding.md index 667b5758a..af44b2cca 100644 --- a/http-transport-binding.md +++ b/http-transport-binding.md @@ -207,7 +207,7 @@ specification, header names are case-insensitive. ##### 3.1.3.2 HTTP Header Values The value for each HTTP header is constructed from the respective attribute's -[JSON value][json-value] representation, compliant with the [JSON event +unquoted [JSON value][json-value] representation, compliant with the [JSON event format][json-format] specification. Some CloudEvents metadata attributes can contain arbitrary UTF-8 string content, @@ -226,8 +226,6 @@ with [RFC7230, sections 3, 3.2, 3.2.6][rfc7230-section-3]. The rules for encoding of the percent character ('%') apply as defined in [RFC 3986 Section 2.4.][rfc3986-section-2-4]. -JSON objects and arrays are NOT surrounded with single or double quotes. - #### 3.1.4 Examples This example shows the _binary_ mode mapping of an event with an HTTP POST @@ -236,11 +234,11 @@ request: ```text POST /someresource HTTP/1.1 Host: webhook.example.com -ce-specversion: "0.3-wip" -ce-type: "com.example.someevent" -ce-time: "2018-04-05T03:56:24Z" -ce-id: "1234-1234-1234" -ce-source: "/mycontext/subcontext" +ce-specversion: 0.3-wip +ce-type: com.example.someevent +ce-time: 2018-04-05T03:56:24Z +ce-id: 1234-1234-1234 +ce-source: /mycontext/subcontext .... further attributes ... Content-Type: application/json; charset=utf-8 Content-Length: nnnn @@ -254,11 +252,11 @@ This example shows a response containing an event: ```text HTTP/1.1 200 OK -ce-specversion: "0.3-wip" -ce-type: "com.example.someevent" -ce-time: "2018-04-05T03:56:24Z" -ce-id: "1234-1234-1234" -ce-source: "/mycontext/subcontext" +ce-specversion: 0.3-wip +ce-type: com.example.someevent +ce-time: 2018-04-05T03:56:24Z +ce-id: 1234-1234-1234 +ce-source: /mycontext/subcontext .... further attributes ... Content-Type: application/json; charset=utf-8 Content-Length: nnnn @@ -467,6 +465,7 @@ Content-Length: nnnn - [RFC7540][rfc7540] Hypertext Transfer Protocol Version 2 (HTTP/2) [ce]: ./spec.md +[extensions]: ./extensions/ [json-format]: ./json-format.md [json-batch-format]: ./json-format.md#4-json-batch-format [content-type]: https://tools.ietf.org/html/rfc7231#section-3.1.1.5 diff --git a/json-format.md b/json-format.md index b954ff54e..4ab67b769 100644 --- a/json-format.md +++ b/json-format.md @@ -64,7 +64,7 @@ exceptions noted below. | CloudEvents | JSON | | ------------- | -------------------------------------------------------------- | | String | [string][json-string] | -| Integer | [number][json-number], only the `int` component is permitted | +| Integer | [string][json-string], interpreted as a [number][json-number] | | Binary | [string][json-string], [Base64-encoded][base64] binary | | URI-reference | [string][json-string] following [RFC 3986][rfc3986] | | Timestamp | [string][json-string] following [RFC 3339][rfc3339] (ISO 8601) | @@ -180,7 +180,7 @@ Example event with `String`-valued `data`: "time" : "2018-04-05T17:31:00Z", "comexampleextension1" : "value", "comexampleextension2" : { - "otherValue": 5 + "otherValue": "5" }, "datacontenttype" : "text/xml", "data" : "" @@ -198,7 +198,7 @@ Example event with `Binary`-valued data "time" : "2018-04-05T17:31:00Z", "comexampleextension1" : "value", "comexampleextension2" : { - "otherValue": 5 + "otherValue": "5" }, "datacontenttype" : "application/vnd.apache.thrift.binary", "data" : "... base64 encoded string ..." @@ -217,7 +217,7 @@ or [JSON data](#31-special-handling-of-the-data-attribute) data: "time" : "2018-04-05T17:31:00Z", "comexampleextension1" : "value", "comexampleextension2" : { - "otherValue": 5 + "otherValue": "5" }, "datacontenttype" : "application/json", "data" : { @@ -267,7 +267,7 @@ second with JSON data. "time" : "2018-04-05T17:31:00Z", "comexampleextension1" : "value", "comexampleextension2" : { - "otherValue": 5 + "otherValue": "5" }, "datacontenttype" : "application/vnd.apache.thrift.binary", "data" : "... base64 encoded string ..." @@ -280,7 +280,7 @@ second with JSON data. "time" : "2018-04-05T17:31:05Z", "comexampleextension1" : "value", "comexampleextension2" : { - "otherValue": 5 + "otherValue": "5" }, "datacontenttype" : "application/json", "data" : { diff --git a/spec.md b/spec.md index 7f5d5b465..37b4e451b 100644 --- a/spec.md +++ b/spec.md @@ -411,7 +411,7 @@ The following example shows a CloudEvent serialized as JSON: "time" : "2018-04-05T17:31:00Z", "comexampleextension1" : "value", "comexampleextension2" : { - "othervalue": 5 + "othervalue": "5" }, "datacontenttype" : "text/xml", "data" : ""