Re: [OAUTH-WG] application/x-www-form-urlencoded vs JSON (Proposal)

"Manger, James H" <James.H.Manger@team.telstra.com> Fri, 30 April 2010 01:51 UTC

Return-Path: <James.H.Manger@team.telstra.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id A98AB3A63EB for <oauth@core3.amsl.com>; Thu, 29 Apr 2010 18:51:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.081
X-Spam-Level: *
X-Spam-Status: No, score=1.081 tagged_above=-999 required=5 tests=[AWL=-0.618, BAYES_50=0.001, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, RELAY_IS_203=0.994]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cya8Mzb135jj for <oauth@core3.amsl.com>; Thu, 29 Apr 2010 18:51:15 -0700 (PDT)
Received: from ipxano.tcif.telstra.com.au (ipxano.tcif.telstra.com.au [203.35.82.200]) by core3.amsl.com (Postfix) with ESMTP id 597E23A6358 for <oauth@ietf.org>; Thu, 29 Apr 2010 18:51:13 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.52,299,1270389600"; d="scan'208";a="2304234"
Received: from unknown (HELO ipcani.tcif.telstra.com.au) ([10.97.216.200]) by ipoani.tcif.telstra.com.au with ESMTP; 30 Apr 2010 11:50:58 +1000
X-IronPort-AV: E=McAfee;i="5400,1158,5967"; a="1650661"
Received: from wsmsg3706.srv.dir.telstra.com ([172.49.40.80]) by ipcani.tcif.telstra.com.au with ESMTP; 30 Apr 2010 11:50:59 +1000
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by wsmsg3706.srv.dir.telstra.com ([172.49.40.80]) with mapi; Fri, 30 Apr 2010 11:50:58 +1000
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: "oauth@ietf.org" <oauth@ietf.org>
Date: Fri, 30 Apr 2010 11:50:57 +1000
Thread-Topic: [OAUTH-WG] application/x-www-form-urlencoded vs JSON (Proposal)
Thread-Index: Acrn1JdrDXA7zW7KSCO+1dGXoNW2GwAKqxpg
Message-ID: <255B9BB34FB7D647A506DC292726F6E11257B7ACB1@WSMSG3153V.srv.dir.telstra.com>
References: <9890332F-E759-4E63-96FE-DB3071194D84@gmail.com> <90C41DD21FB7C64BB94121FBBC2E723438E30A379B@P3PW5EX1MB01.EX1.SECURESERVER.NET> <20100419134825.134951nuzvi35hk4@webmail.df.eu> <90C41DD21FB7C64BB94121FBBC2E723438E5C7F45E@P3PW5EX1MB01.EX1.SECURESERVER.NET> <4BD2A172.2070401@lodderstedt.net> <4BD8869A.2080403@lodderstedt.net> <s2zc334d54e1004281425x5e714eebwcd5a91af593a62ac@mail.gmail.com> <v2j68fba5c51004282044o3a5f96cfucb1157d3884d8cd2@mail.gmail.com> <4BD9E1E3.7060107@lodderstedt.net>
In-Reply-To: <4BD9E1E3.7060107@lodderstedt.net>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Subject: Re: [OAUTH-WG] application/x-www-form-urlencoded vs JSON (Proposal)
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 30 Apr 2010 01:51:16 -0000

> multiple response formats

Quite a few people (most?) have (often strongly) favoured a single response format, and most of them prefer JSON. I agree: JSON for responses, application/x-www-form-urlencoded for requests.


> Proposed changes to section 3.5.2 should be applied to
> 3.5.3, 3.6.1., 3.7.1., 3.7.2, and 4., too.

I hope we can reduce the duplication by describing the format once only.


> parameters are encoded straight-forward as flat JSON object

It would be better to use the basic JSON types, not just strings for everything.
For instance, 
  "expires_in": 3600
Instead of
  "expires_in": "3600"
Forcing all values to be strings may simplify mapping between multiple formats, but it hinders idiomatic use of the formats (which is important). This is another reason to pick a single format.


> application/json

There are lots of application/XXXX+xml media types that are better to use than the generic application/xml. <http://tools.ietf.org/html/rfc3023#appendix-A>
Is the same true for JSON?
I think an application/credential media type would be more helpful (perhaps with a "+json" suffix if that is common practise).


--
James Manger