Skip to content

Commit

Permalink
Explicitly state application/json defaulting when serializing
Browse files Browse the repository at this point in the history
(I've used SHOULD rather than MUST to be consistent with deserialization. If we were starting from scratch, I'd suggest that MUST would be more appropriate, but it's probably too late to do that.)

Fixes cloudevents#880
  • Loading branch information
jskeet committed Oct 7, 2021
1 parent 3b346bf commit 69b3730
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ contain JSON-formatted content. Such a content type is defined as one having a
[media subtype][rfc2045-sec5] equal to `json` or ending with a `+json` format
extension. That is, a `datacontenttype` declares JSON-formatted content if its
media type, when stripped of parameters, has the form `*/json` or `*/*+json`.
If the `datacontenttype` is unspecified, processing SHOULD proceed as if the
`datacontenttype` had been specified explicitly as `application/json`.

If the `datacontenttype` declares the data to contain JSON-formatted content, a
JSON serializer MUST translate the data value to a [JSON value][json-value], and
Expand Down

0 comments on commit 69b3730

Please sign in to comment.