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

Marius Scurtescu <mscurtescu@google.com> Wed, 05 May 2010 18:28 UTC

Return-Path: <mscurtescu@google.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 231CB28C142 for <oauth@core3.amsl.com>; Wed, 5 May 2010 11:28:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.925
X-Spam-Level:
X-Spam-Status: No, score=-105.925 tagged_above=-999 required=5 tests=[AWL=0.052, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 huDVodxvFXaa for <oauth@core3.amsl.com>; Wed, 5 May 2010 11:28:07 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 8DE8C28C132 for <oauth@ietf.org>; Wed, 5 May 2010 11:26:06 -0700 (PDT)
Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id o45IPqVA006413 for <oauth@ietf.org>; Wed, 5 May 2010 11:25:52 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1273083952; bh=TXwENLL1895kVimcDRWDMBJwjZw=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=Sqx5+QnhhVqVcXjlksQX7rnmgdd8kLNuNEcNL5FeeABmrwUHGwoamL1SngP+Gzz1v CVtW0QdYVsOoL8zyfj5Ww==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:from:date:message-id: subject:to:cc:content-type:content-transfer-encoding:x-system-of-record; b=lgcnYAeu8kVxgsHT7NFyPsyTZMJ46MUSRLjYazUUaIO6Aeq3LRHndklSqETBaWhKs 6uNXtS1m203Y6+EraTgfw==
Received: from pvg7 (pvg7.prod.google.com [10.241.210.135]) by kpbe11.cbf.corp.google.com with ESMTP id o45IPpYR000479 for <oauth@ietf.org>; Wed, 5 May 2010 11:25:51 -0700
Received: by pvg7 with SMTP id 7so437264pvg.8 for <oauth@ietf.org>; Wed, 05 May 2010 11:25:51 -0700 (PDT)
Received: by 10.141.90.1 with SMTP id s1mr5848368rvl.57.1273083951036; Wed, 05 May 2010 11:25:51 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.141.14.15 with HTTP; Wed, 5 May 2010 11:25:29 -0700 (PDT)
In-Reply-To: <4BE1B6A8.6050706@lodderstedt.net>
References: <9890332F-E759-4E63-96FE-DB3071194D84@gmail.com> <7C01E631FF4B654FA1E783F1C0265F8C4A3EF0B0@TK5EX14MBXC115.redmond.corp.microsoft.com> <z2yf5bedd151004291440g17693f8du9e19a649bef925e4@mail.gmail.com> <w2odaf5b9571004291509x8895a73k384a4b4ddb12b794@mail.gmail.com> <20100430105935.20255m8kdythy6sc@webmail.df.eu> <90C41DD21FB7C64BB94121FBBC2E723439323D0DB0@P3PW5EX1MB01.EX1.SECURESERVER.NET> <AANLkTik3NSJynWfiNWovruPEOT2Y6G1zcWPFOaS_pHdy@mail.gmail.com> <4BE1AF25.7000308@lodderstedt.net> <AANLkTimzLxbkKBLfuWGTxMrvWWP-bwiduYUZI5uj20QY@mail.gmail.com> <4BE1B6A8.6050706@lodderstedt.net>
From: Marius Scurtescu <mscurtescu@google.com>
Date: Wed, 05 May 2010 11:25:29 -0700
Message-ID: <AANLkTilW3KjWlvvjZxxmhGDLwi7J6I9LiAxB7ij7KDa2@mail.gmail.com>
To: Torsten Lodderstedt <torsten@lodderstedt.net>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: "oauth@ietf.org" <oauth@ietf.org>
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: Wed, 05 May 2010 18:28:08 -0000

On Wed, May 5, 2010 at 11:19 AM, Torsten Lodderstedt
<torsten@lodderstedt.net> wrote:
> Am 05.05.2010 20:14, schrieb Marius Scurtescu:
>>
>> On Wed, May 5, 2010 at 10:47 AM, Torsten Lodderstedt
>> <torsten@lodderstedt.net>  wrote:
>>
>>>
>>> Even if not supported directly by the platform there are many JSON
>>> libraries
>>> available these days.
>>>
>>> http://www.json.org/ lists 3 libraries for Objective-C alone.
>>>
>>> Moreover, the JSON documents we are discussing now are simple, something
>>> like
>>>
>>> { "access_token": "SlAV32hkKG", "expires_in": "3600", "refresh_token":
>>> "8xLOxBtZp8" }
>>>
>>> Parsing such a document is not a challenge even without library support.
>>>
>>
>> I never written such code, but I imagine it would be quite complicated
>> and error prone. You have to deal with escaping, white spaces and
>> nested data structures.
>>
>> Marius
>>
>
> we don't need nested data structure (at least currently). Where do you see a
> need for escaping?

How do you represent " { } , and : inside names and values? You
probably need full blown lexer and parser for JSON.

Marius