Re: [apps-discuss] WebFinger payload as array or object

"Markus Lanthaler" <markus.lanthaler@gmx.net> Fri, 30 November 2012 11:40 UTC

Return-Path: <markus.lanthaler@gmx.net>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A1AD321F8678 for <apps-discuss@ietfa.amsl.com>; Fri, 30 Nov 2012 03:40:45 -0800 (PST)
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 ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zWjb5+MUb920 for <apps-discuss@ietfa.amsl.com>; Fri, 30 Nov 2012 03:40:45 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ietfa.amsl.com (Postfix) with SMTP id C073621F8508 for <apps-discuss@ietf.org>; Fri, 30 Nov 2012 03:40:44 -0800 (PST)
Received: (qmail invoked by alias); 30 Nov 2012 11:40:42 -0000
Received: from unknown (EHLO Vostro3500) [84.115.182.43] by mail.gmx.net (mp017) with SMTP; 30 Nov 2012 12:40:42 +0100
X-Authenticated: #419883
X-Provags-ID: V01U2FsdGVkX1/aoh5s4X/aFrIhYoXX2WGo/gpQsl6RvViHpadvhs ad73QmjDY+aqUZ
From: Markus Lanthaler <markus.lanthaler@gmx.net>
To: webfinger@googlegroups.com
References: <CAHBU6itq44z7c8F=+-bqQqpv5Eoki-Lqi+jJoLT8tL71jY8VTg@mail.gmail.com> <CABP7RbcZU5CSL5G4b6dPyiOiSWTQV+Vmu09KQ1CSda3inYgwjw@mail.gmail.com> <CAKaEYh+edYgtYEpmUFCD6h=vgon=c1tgdhhfv+FuQ_AoM6KoKQ@mail.gmail.com> <CAPW_8m6brQ-5wX8-659XuxE+LaPOftYVsb767Z9_SLHr8du4QA@mail.gmail.com> <CANqiZJZK66tT_N1JfCj1WqMxVeO0Jtd9au_xnuGtqE-8VzvPcg@mail.gmail.com> <014701cdce69$c51ef240$4f5cd6c0$@packetizer.com> <CANqiZJb3xGZ6MvabLKCfFx-Ps0i1jFkY47jehw8v-s+2Nk_JJw@mail.gmail.com> <3C24A51B-2D83-4142-896F-8C587BC045D2@josephholsten.com> <CANqiZJZft1oX_pg0ohdJesdc6qdpHJQ32ZSBkRkZDqueU8iRnw@mail.gmail.com> <7A879D5E-5012-4EB6-9017-BB13FAB65A0A@josephholsten.com> <CANqiZJZCwVksVZPjZ_ma5=7aGX9Qj2sq34TgthC2OWp+yVd6kA@mail.gmail.com>
In-Reply-To: <CANqiZJZCwVksVZPjZ_ma5=7aGX9Qj2sq34TgthC2OWp+yVd6kA@mail.gmail.com>
Date: Fri, 30 Nov 2012 12:40:35 +0100
Message-ID: <00ac01cdceef$84a7fdc0$8df7f940$@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: Ac3O6tqspw55yBCeQieopOrNBdEwEgAAFg4g
Content-Language: de
X-Y-GMX-Trusted: 0
Cc: 'IETF Apps Discuss' <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] WebFinger payload as array or object
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 30 Nov 2012 11:40:45 -0000

Melvin brought this discussion to my attention. So let me jump in here.


On Friday, November 30, 2012 12:07 PM, Mike Kelly wrote:
> 
> This isn't bikeshedding. It's a fundamental part of the interface
> you're presenting to clients. Having picked JSON.. "we want to copy
> html" is a weak reason to not make the most of JSON's object model
> here; particularly when doing so equally expressive, carries no
> apparent drawbacks, and is significantly more intuitive to deal with
> as the links can be addressed using standard JSON traversal.

I completely agree with Mike on this. Developers definitely want to use
standard JSON traversal instead of having to use filters for this basic use
case -- at least that was a common feedback we got when designing JSON-LD.

To simplify client development even further I would also require that the
value of such a rel property is always an array, even if there's just a
single item; just as James proposed [1] in "Plan C":

"links" : {
  "rel1": [
     { "href" : "http://example/1", "type" : "text/plain" },
     { "href" : "http://example/2", "type" : "text/plain" }
  ],
  "rel2": [
    { "href" : "http://example/3", "type" : "application/json" }
  ]
}

This gives you a nice, uniform data structure and if you want, you can rely
on ordering at the array level.


Btw. Have there been discussions about the media type of such a response? I
haven't been able to find anything and both the current draft and RFC6415
seem to be using application/json. I think it would be much better to create
a specific media type such as application/webfinger+json for such documents.


Cheers,
Markus


[1] http://www.ietf.org/mail-archive/web/apps-discuss/current/msg08170.html
[2] https://tools.ietf.org/html/draft-ietf-appsawg-webfinger-06
[3] http://tools.ietf.org/html/rfc6415
[4] http://tools.ietf.org/html/draft-wilde-profile-link-04



--
Markus Lanthaler
@markuslanthaler