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

"Markus Lanthaler" <markus.lanthaler@gmx.net> Wed, 08 August 2012 09:00 UTC

Return-Path: <markus.lanthaler@gmx.net>
X-Original-To: ietf-types@ietfa.amsl.com
Delivered-To: ietf-types@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1F86521F8568 for <ietf-types@ietfa.amsl.com>; Wed, 8 Aug 2012 02:00:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.15
X-Spam-Level:
X-Spam-Status: No, score=-1.15 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, MSGID_MULTIPLE_AT=1.449]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f4SeUgzQyPYW for <ietf-types@ietfa.amsl.com>; Wed, 8 Aug 2012 02:00:37 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 9157D21F85A0 for <ietf-types@ietf.org>; Wed, 8 Aug 2012 02:00:36 -0700 (PDT)
Received: (qmail invoked by alias); 08 Aug 2012 09:00:33 -0000
Received: from host217-104-dynamic.51-79-r.retail.telecomitalia.it (EHLO Vostro3500) [79.51.104.217] by mail.gmx.net (mp016) with SMTP; 08 Aug 2012 11:00:33 +0200
X-Authenticated: #419883
X-Provags-ID: V01U2FsdGVkX1/zQkZXBFPzvsN6/0SBEBS2c/L6l7WYraJqbbrhAL Fhgj7NwKRCKXo8
From: Markus Lanthaler <markus.lanthaler@gmx.net>
To: "'Michael[tm] Smith'" <mike@w3.org>, ietf-types@ietf.org
References: <20120807115025.GK67292@sideshowbarker>
In-Reply-To: <20120807115025.GK67292@sideshowbarker>
Date: Wed, 08 Aug 2012 11:00:24 +0200
Message-ID: <00c901cd7544$44c8d210$ce5a7630$@lanthaler>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac10ktrjELC971ZLQhi9JZuHmUacGQAryijA
Content-Language: de
X-Y-GMX-Trusted: 0
Subject: Re: [ietf-types] Registration for application/microdata+json
X-BeenThere: ietf-types@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Media \(MIME\) type review" <ietf-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf-types>
List-Post: <mailto:ietf-types@ietf.org>
List-Help: <mailto:ietf-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Aug 2012 09:00:38 -0000

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: ietf-types-bounces@ietf.org [mailto:ietf-types-bounces@ietf.org]
> On Behalf Of Michael[tm] Smith
> Sent: Tuesday, August 07, 2012 1:50 PM
> To: ietf-types@ietf.org
> Subject: [ietf-types] Registration for application/microdata+json
> 
> 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 <mike@w3.org>
> 
> Intended usage:
>   Common
> 
> Restrictions on usage:
>   No restrictions apply.
> 
> Author:
>   Ian Hickson <ian@hixie.ch>
> 
> 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
> _______________________________________________
> ietf-types mailing list
> ietf-types@ietf.org
> https://www.ietf.org/mailman/listinfo/ietf-types