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

Change media type to application/feed+json #84

Closed
da2x opened this issue May 27, 2017 · 2 comments
Closed

Change media type to application/feed+json #84

da2x opened this issue May 27, 2017 · 2 comments

Comments

@da2x
Copy link

da2x commented May 27, 2017

The application/json media type (formerly ‘MIME type)’ is way too generic. It may cause clients trying to auto-discovery JSONFeeds to fetch several irrelevant JSON documents that may be linked from a document. JSONFeed calls for the introduction of a new media type so clients don’t need to download a ton of other JSON documents in an effort to discover JSONFeeds.

I suggest changing to application/feed+json (That is: type + underlying structure). Another example of this is type of media type is application/ld+json for the JSON for Linking Data or even application/atom+xml for Atom syndication feeds.

The new auto-discovery protocol would look like this:

<link rel="alternate" type="application/feed+json" href="https://example.org/feed.json" />

This would also allow for HTTP content negotation. Client sends Accept: application/feed+json,application/atom+xml;q=0.8, and the server could then negotiate and return JSONfeed.

Note that media types should be registered (not required, but grants legitimacy to the standard). The process is defined in RFC 6838.

See also issue #73.

@rvklein
Copy link

rvklein commented Jun 11, 2017

I agree with application/json+feed as the appropriate designation of the media type.

At some point in time, it had been proposed to standardise feed as a valid <link> relational attribute, specifically for the purpose of enabling feed autodiscovery. I don't think this caught very much traction, but I swear I've seen it used quite a number of times before in the source of production pages from more than one piece of CMS software. There shouldn't be anything technically invalid with using <link rel="alternate feed" type="application/feed+json" />. At least, it shouldn't and probably won't break feed autodiscovery. Even if you did this in an older client with an equivalent RSS or ATOM feed mediatype, it probably wouldn't break all but the lowliest RegExp.

Of note here is this article I dug up: https://blog.whatwg.org/feed-autodiscovery
Which states the following semantic posit:

The feed keyword can also be used in combination with alternate to say that it is specifically the feed for the current document.

Pragmatically, however: the <link> relational type specifier of alternate seems semantically coupled to any specified type to also infer the kind of alternate content which is linked. So, worrying about that is probably more important than debating semantics for now.

The consideration of drafting a registration according to RFC6838 is appreciated personally here. Thank you.

@manton
Copy link
Owner

manton commented Jun 16, 2018

Going to close this but keep #32 open. Thanks!

@manton manton closed this as completed Jun 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants