Subject: [ietf-types] Registration for application/microdata+json

From: "Michael[tm] Smith" <[email-masked]>
Date: Tue, 7 Aug 2012 20:50:27 +0900

This is a request to register the application/microdata+json media type by
reference to the HTML Microdata specification:

  http://www.w3.org/TR/microdata/#application-microdata-json

---------------------------------------------------------------------------
Type name:
  application

Subtype name:
  microdata+json

Required parameters:
  Same as for application/json [JSON]

Optional parameters:
  Same as for application/json [JSON]

Encoding considerations:
  8bit (always UTF-8)

Security considerations:
  Same as for application/json [JSON]

Interoperability considerations:
  Same as for application/json [JSON]

Published specification:
  Labeling a resource with the application/microdata+json type asserts that
  the resource is a JSON text that consists of an object with a single entry
  called "items" consisting of an array of entries, each of which consists of
  an object with an entry called "id" whose value is a string, an entry
  called "type" whose value is another string, and an entry called
  "properties" whose value is an object whose entries each have a value
  consisting of an array of either objects or strings, the objects being of
  the same form as the objects in the aforementioned "items" entry. Thus, the
  relevant specifications are the JSON specification and the HTML Microdata
  specification.  [JSON]

Applications that use this media type:
  Same as for application/json [JSON]

Additional information:
  Magic number(s):
    Same as for application/json [JSON]
  File extension(s):
    Same as for application/json [JSON]
  Macintosh file type code(s):
    Same as for application/json [JSON]

Person & email address to contact for further information:
  Michael[tm] Smith <[email-masked]>

Intended usage:
  Common

Restrictions on usage:
  No restrictions apply.

Author:
  Ian Hickson <[email-masked]>

Change controller:
  W3C

Fragment identifiers used with application/microdata+json resources have
the same semantics as when used with application/json (namely, at the time
of writing, no semantics at all). [JSON]
---------------------------------------------------------------------------

-- 
Michael[tm] Smith http://people.w3.org/mike

---

From: "Markus Lanthaler" <[email-masked]>
Date: Wed, 8 Aug 2012 11:00:24 +0200

Michael,

I'm not sure if this is the right place to ask this question, so if it's not
please tell me.
I was wondering whether it was considered to use JSON-LD [1] instead of
creating application/microdata+json. The resulting output would be more or
less the same.

For example the following application/microdata+json document:

{
  "items": [
    {
      "id": "http://example.com/id1",
      "type": [ "http://example.com/type1" ],
      "properties": {
        "property1": [ "value1" ],
        "property2": [
          {
            "id": "http://example.com/id2",
            "type": [ 
              "http://example.com/type2", 
              "http://example.com/type3"
            ],
            "properties": {
              "property3": [ "http://example.com/value3" ]
            }
          }
        ]
      }
    }
  ]
}

Could be expressed in JSON-LD as

{
  "@graph": [
    {
      "@id": "http://example.com/id1",
      "@type": [ "http://example.com/type1" ],
      "property1": [ "value1" ],
      "property2": [
        {
          "@id": "http://example.com/id2",
          "@type": [ 
            "http://example.com/type2", 
            "http://example.com/type3"
          ],
          "properties": {
            "property3": [ { "@id": "http://example.com/value3" } ]
          }
        }
      ]
    }
  ]
}

Or, by aliasing JSON-LD's keywords even as which is almost exactly the same
as the application/microdata+json counterpart:

{
  "@context": {
    "id": "@id",
    "type": "@type",
    "items": "@graph"
  },
  "items": [
    {
      "id": "http://example.com/id1",
      "type": [ "http://example.com/type1" ],
      "property1": [ "value1" ],
      "property2": [
        {
          "id": "http://example.com/id2",
          "type": [ 
            "http://example.com/type2", 
            "http://example.com/type3"
          ],
          "properties": {
            "property3": [ { "@id": "http://example.com/value3" } ]
          }
        }
      ]
    }
  ]
}

[1] http://www.w3.org/TR/json-ld-syntax/

--
Markus Lanthaler
@markuslanthaler

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]]
> On Behalf Of Michael[tm] Smith
> Sent: Tuesday, August 07, 2012 1:50 PM
> To: [email-masked]
> Subject: [ietf-types] Registration for application/microdata+json
> 
> _______________________________________________
> ietf-types mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ietf-types

---

From: "Michael[tm] Smith" <[email-masked]>
Date: Thu, 9 Aug 2012 01:00:47 +0900

> creating application/microdata+json. The resulting output would be more or

I see that you've since posted about this over on the whatwg mailing list.
I think that's the best place to discuss it, so let's see how things
progress over there.

  --Mike

---

From: "Markus Lanthaler" <[email-masked]>
Date: Wed, 8 Aug 2012 18:09:03 +0200

> I think that's the best place to discuss it, so let's see how things

Sure!

--
Markus Lanthaler
@markuslanthaler