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

James M Snell <jasnell@gmail.com> Mon, 08 April 2013 16:34 UTC

Return-Path: <jasnell@gmail.com>
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 0D27321F86C0 for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 09:34:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, NO_RELAYS=-0.001]
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 tXCJK8WB-sp1 for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 09:34:04 -0700 (PDT)
Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) by ietfa.amsl.com (Postfix) with ESMTP id 9C69E21F86BB for <apps-discuss@ietf.org>; Mon, 8 Apr 2013 09:34:04 -0700 (PDT)
Received: by mail-ob0-f178.google.com with SMTP id ni5so1372727obc.23 for <apps-discuss@ietf.org>; Mon, 08 Apr 2013 09:34:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=iZuCXqUNkjEeI9YXva0jQf/s3/ubmlgfpLyyuk5YDdM=; b=NUcI0BvXOUNPN31PznRRn9yFkhe1o6G61lF2yIMDFRNw+ZUKCIao8sK0LUyThjm8co aheceULlUzQhX0s1LpTVl2VO8QuEnQAAC+jEWIRPnHN8mFsxs5/EhR585x+Pxd7X4zYY cZ5C8bhxjeZzYEP+aBdHrqCu3FLvtz68pdCmYl0JZbVeH4ZIV0N2U0uJrCvog4jdWOyb +Y0/FYt73p82Nl6PAZY8iXarnajm0pEeryngWmLb4nq+E4Ob4O6cmwwU9Oeg2uc/FdNg tYgNPRkRAGnN7C1XCgFnsZqK1FSG35Y/zv3nVrdCwq0P4tL6eFNkg3rXotK6Eh33qSoW REZQ==
X-Received: by 10.182.245.72 with SMTP id xm8mr15962766obc.1.1365438844167; Mon, 08 Apr 2013 09:34:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.132.102 with HTTP; Mon, 8 Apr 2013 09:33:44 -0700 (PDT)
In-Reply-To: <CALcybBA=19Dk_XWNjT7Cfd0OQAno1YfYUK+mnqsLADgQ+JSofw@mail.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> <5162EA00.9060006@berkeley.edu> <CALcybBA=19Dk_XWNjT7Cfd0OQAno1YfYUK+mnqsLADgQ+JSofw@mail.gmail.com>
From: James M Snell <jasnell@gmail.com>
Date: Mon, 8 Apr 2013 09:33:44 -0700
Message-ID: <CABP7RbecvKU_6mKLjftXyByr_UGf+Qj-AzVN4G-3i7wh2UznRA@mail.gmail.com>
To: Francis Galiegue <fgaliegue@gmail.com>
Content-Type: text/plain; charset=UTF-8
Cc: Joe Gregorio <joe@bitworking.org>, IETF Apps Discuss <apps-discuss@ietf.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:34:06 -0000

I agree that the text in the spec is certainly not clear in this. In
my implementation, I've had to fall back to recreating the behavior
shown in the examples. So to answer the question "why", I just fall
back to my original answer: That's what the example shows.


On Mon, Apr 8, 2013 at 9:30 AM, Francis Galiegue <fgaliegue@gmail.com> wrote:
> On Mon, Apr 8, 2013 at 6:02 PM, Erik Wilde <dret@berkeley.edu> wrote:
> [...]
>>
>> i agree that since JSON doesn't have associative arrays, [] as a value has
>> to be read as just being an empty array/list.
>
> It does have a "limited" form of it, however: consider a JSON object
> where member values are primitives, which can be coerced to strings.
>
>> 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.
>>
>
> That was my thought as well. More generally, the text is very complex
> to follow :/ I've had the devil's own job trying to figure it out.
>
> --
> Francis Galiegue, fgaliegue@gmail.com
> JSON Schema in Java: http://json-schema-validator.herokuapp.com