[whatwg] Was is considered to use JSON-LD instead of creating application/microdata+json?
markus.lanthaler at gmx.net
Thu Aug 9 07:44:15 PDT 2012
On Thursday, August 09, 2012 1:18 AM, Ian Hickson wrote.
> On Wed, 8 Aug 2012, Markus Lanthaler wrote:
> > I was wondering whether it was considered to use JSON-LD  instead
> > creating application/microdata+json. The resulting output would be
> > or less the same.
> It wasn't. What would be the purpose of doing so?
> The only reason there's a MIME type at all (rather than just using
> directly) was to enable filtering of copy-and-paste and drag-and-drop
> payloads; would JSON-LD enable that also?
Sure, I see no reason why not.
> That seems like it is strictly more complicated (trivially so, but
> What is the advantage?
Well, I would say there are several advantages. First of all, JSON-LD is
more flexible and expressive. It has support for string
internationalization, data typing, lists etc. It also allows to distinguish
between IRIs and literals (which isn't the case for
application/microdata+json) which is important for Linked Data application.
Secondly, there is an API for JSON-LD to reframe  a document into a shape
that might be easier to work with in a web app (I think that's the whole
point of microdata+json or am I wrong?). Other API calls allow e.g. to
convert to and from RDF . If you are interested, there is an online
JSON-LD playground  where you can play with the various API calls. Last
but not least it would also make web developers life easier if there are
fewer formats to support/learn.
More information about the whatwg