Re: [apps-discuss] Question about URI template and expansion of an empty list

Erik Wilde <dret@berkeley.edu> Mon, 08 April 2013 16:03 UTC

Return-Path: <dret@berkeley.edu>
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 3020021F97CA for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 09:03:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.134
X-Spam-Level:
X-Spam-Status: No, score=-6.134 tagged_above=-999 required=5 tests=[AWL=0.465, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 q8V3HmK-xht4 for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 09:03:22 -0700 (PDT)
Received: from cm06fe.IST.Berkeley.EDU (cm06fe.IST.Berkeley.EDU [169.229.218.147]) by ietfa.amsl.com (Postfix) with ESMTP id 814AF21F97C8 for <apps-discuss@ietf.org>; Mon, 8 Apr 2013 09:03:22 -0700 (PDT)
Received: from 99-38-249-227.lightspeed.sntcca.sbcglobal.net ([99.38.249.227] helo=[192.168.1.97]) by cm06fe.ist.berkeley.edu with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (auth plain:dret@berkeley.edu) (envelope-from <dret@berkeley.edu>) id 1UPEWF-0006Si-KS; Mon, 08 Apr 2013 09:02:19 -0700
Message-ID: <5162EA00.9060006@berkeley.edu>
Date: Mon, 08 Apr 2013 09:02:08 -0700
From: Erik Wilde <dret@berkeley.edu>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
MIME-Version: 1.0
To: James M Snell <jasnell@gmail.com>
References: <CALcybBBXFDvAp1xpbi4=55Gq0QbfbTH7TV=1MTko7nNdtt-5WQ@mail.gmail.com> <CALcybBBcCTh8+RVWp5UW+2-s9EdKxdoeGdcq6+yGrGJk1nzP0w@mail.gmail.com> <51625870.8000906@berkeley.edu> <CAL0qLwYR+HknkVH5Y_jusqBv3=QbALFe=5t3FhYArNxzQYDPpQ@mail.gmail.com> <CALcybBCeyJce+m7GB8ak_Wmwfk6+Z=bcaDKs489H0v4vLOgahw@mail.gmail.com> <CABP7RbfLQ5wCTNEJ4ufEs76YoVBePP8JYLQkjgUHJQ-o3=pUeg@mail.gmail.com> <CAL0qLwYsVt63VAtg0yqG=KDO7e1DvmE-8ywXM8CBqrt8mxDZOA@mail.gmail.com> <CABP7RbfDOS4pdnx5Z4arwLw8demRfKrT4bE+Jb4uzvcdgzKRfw@mail.gmail.com>
In-Reply-To: <CABP7RbfDOS4pdnx5Z4arwLw8demRfKrT4bE+Jb4uzvcdgzKRfw@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: IETF Apps Discuss <apps-discuss@ietf.org>, Joe Gregorio <joe@bitworking.org>
Subject: Re: [apps-discuss] Question about URI template and expansion of an empty list
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: Mon, 08 Apr 2013 16:03:23 -0000

hello james.

On 2013-04-08 07:50 , James M Snell wrote:
> "empty_keys" is not defined explicitly as an empty associative array.
> The only definition given for "empty_keys" in section 3.2 is
> "empty_keys := []" which is semantically and structurally identical to
> an empty list. So to amend your rules, we have:
> - an undefined value produces "X"
> - a defined-but-empty string produces "X."
> - a defined-but-empty list/associative-array produces "X"

i agree that since JSON doesn't have associative arrays, [] as a value 
has to be read as just being an empty array/list. but i am still 
wondering about francis' "why" question: if we did not have that test 
case and simply had to reason based on the spec test, how would i end up 
with "X" instead of "X."? when i am just reading the text as somebody 
trying to write code implementing it, i read the spec as telling me "X." 
is what should be the result of expansion.

cheers,

dret.

-- 
erik wilde | mailto:dret@berkeley.edu  -  tel:+1-510-2061079 |
            | UC Berkeley  -  School of Information (ISchool) |
            | http://dret.net/netdret http://twitter.com/dret |