W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2012

RE: [p3-payload] Media-Type -- Two Values, One Cup Anti-Pattern?

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Fri, 20 Jan 2012 13:54:09 +0800
To: "'Bjoern Hoehrmann'" <derhoermi@gmx.net>, "'Eric J. Bowman'" <eric@bisonsystems.net>
Cc: <ietf-http-wg@w3.org>
Message-ID: <00bd01ccd737$f08a9990$d19fccb0$@lanthaler@gmx.net>
On Friday, January 20, 2012 12:47 PM, Bjoern Hoehrmann wrote: 
> The media type meta data is often lost (or ignored, or not checked
> for),
> so I would recommend against relying on its presence for new types,
> i.e.
> it might be better to use one type for all the subtypes and use an in-
> ternal discriminator (but I haven't looked at your use case in detail).

Unfortunately that doesn't seem to be possible. All documents will be valid
JSON but their structure is completely different.

> If you do need separate types, then a "+ld" would be odd; "+json" would
> indicate that you can handle the data if you can handle JSON, but you
> would not be able to use the "+ld" in the same way. Besides, it would

OK, thanks, that was what I thought as well.

> seem to me that `application/ld-frame+json` would be more in keeping
> with the terminology.

True! Might be a good alternative

> https://www.ietf.org/mailman/listinfo/ietf-types would be the place to
> discuss this in any case as far as the media type perspective goes.

Thank you very much for this link.

Eric, let me include the reply to your mail as well in here:

On Friday, January 20, 2012 12:42 PM, Eric J. Bowman wrote:
> From looking at the string "application/ld+json", even though I don't
> know what "ld" means, I know that the sender's intended processing
> model is JSON-based, so I can parse it in javascript and get objects,
> fwiw.

That's how it works.. but if you have a JSON-LD parser you can do more with
it, e.g., use hyperlinks.

> > but some people argued that the best practice would be to use
> > application/frame+ld+json which looks weird to me.
> >
> The guidelines are being rewritten to include "+json" etc. right now, I
> doubt multiple "+" syntax will be allowed.  What you have there isn't
> what suffixes are meant to do, at all.

OK, that was my opinion as well. Do you have a link at hand where I can find
more information about this rewriting effort?

Markus Lanthaler
Received on Friday, 20 January 2012 05:54:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:00 UTC