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

Francis Galiegue <fgaliegue@gmail.com> Mon, 08 April 2013 16:30 UTC

Return-Path: <fgaliegue@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 4E89A21F9786 for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 09:30:05 -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 w2EVhcxdHjUZ for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 09:30:04 -0700 (PDT)
Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com [IPv6:2a00:1450:4013:c01::22a]) by ietfa.amsl.com (Postfix) with ESMTP id 3BCCE21F977A for <apps-discuss@ietf.org>; Mon, 8 Apr 2013 09:30:04 -0700 (PDT)
Received: by mail-ea0-f170.google.com with SMTP id a15so2354261eae.1 for <apps-discuss@ietf.org>; Mon, 08 Apr 2013 09:30:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=T4nJabpvGw8JDEejqPAGG0LM1ymtKoFzryERg2ukyvA=; b=E5dYaW3DLsmEm6yyeLWQwBJ2C8eN/odrFpmzN6qRUBT75+khxhFVPfRAPHEYAGN21h u0MVs8Qwtw9zhbrymjqD+IqkryKxG8xblqzJR58tGSxxVOI/4qpEcMIWVwzZzGmTb1eR s9eaSZmxqF51Zb9JOnS2cDPWUcnDyH8PwDL+QxfupCIlo4zw8rrWKNuGILZp0+yXxVOi 2jflnHXj6gMOD7aFdmJ+XE9atS9mYceEb8tbilcYfKc8qFovtTbJayKxwncPyWTssTCV RL6D7occw/ILNdZmKVuQqE+UhRd2y/DYGaSaf39R5Id06R2mkh3qpOBCQoQnwdx5Zxbn KsTA==
MIME-Version: 1.0
X-Received: by 10.14.179.201 with SMTP id h49mr50124095eem.26.1365438602925; Mon, 08 Apr 2013 09:30:02 -0700 (PDT)
Received: by 10.14.213.4 with HTTP; Mon, 8 Apr 2013 09:30:02 -0700 (PDT)
In-Reply-To: <5162EA00.9060006@berkeley.edu>
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>
Date: Mon, 8 Apr 2013 18:30:02 +0200
Message-ID: <CALcybBA=19Dk_XWNjT7Cfd0OQAno1YfYUK+mnqsLADgQ+JSofw@mail.gmail.com>
From: Francis Galiegue <fgaliegue@gmail.com>
To: Erik Wilde <dret@berkeley.edu>
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:30:05 -0000

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