Re: [Json] JSON Content Rules -05

Andrew Newton <andy@hxr.us> Fri, 18 March 2016 16:51 UTC

Return-Path: <andy@hxr.us>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4FD6312D943 for <json@ietfa.amsl.com>; Fri, 18 Mar 2016 09:51:29 -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=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hxr-us.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id az1oyC6NbBND for <json@ietfa.amsl.com>; Fri, 18 Mar 2016 09:51:27 -0700 (PDT)
Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A77E212D971 for <json@ietf.org>; Fri, 18 Mar 2016 09:51:26 -0700 (PDT)
Received: by mail-wm0-x233.google.com with SMTP id l68so45583255wml.1 for <json@ietf.org>; Fri, 18 Mar 2016 09:51:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hxr-us.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=7v0KA+3f5ok0uMdxm/exbPld14okzhT/kShE7ieYMW0=; b=ldv2FIwue+i9MZuqRMweFgn6aZPcYVD6UkWTNf5XEIeHMfoTBocL3qgxQG6BMjkEiW uPMZ5HcFZ+wfdOGevJux6VrRHUxRR0gE4SAYDEdpeRlageQhYkGL4Q8SoXkVkjz/kyJk VNRl9ajsYwjv/B/iILi8LLLAzH7IdOyeZ1EXZPSpx9vJL+ri1oPtqX8xgZKU8TEtHaQB 66ejhXE0eJR935j3dBhCv/AboqQQFSlobWd/MYAQz5p5Q8PwU5VgUjfzbzCXpdsgTzUM w2gW+Ih3KEEywz7dnlfMOvky/1O3TbDVnFtSUC6LegnU1wgPfQhepH6rZG2ET8S2Kd1i FCfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=7v0KA+3f5ok0uMdxm/exbPld14okzhT/kShE7ieYMW0=; b=FXpBqqBn6kNOoxFvpoiXgbuDDzg8NTRptdYjO3eVyz7gdKIgRDImbTiBd1wd3exNWT Xt09hiRq/qJDiPKADGhVv84o4PxIbeipGGPbnyzHwSmsrAoSJITzMeUOOqD2Dh3SDd7W jK+zW9WuPCZvW2vYIUG8dbNfsmy1v2Ot81mxlJr27HwGIXJwlRjWXze3Dd90jy3QrGnv nhZ6sc5eZUbwR7xIGBZqebwRScHwCau8Wj1eKU7lAjwoMmf2zeAIKvfK8C+tvWqRZLJh qnBF4kLMjFM+mFUhR2NYNU/1+XNWg97mXWCbUkmvjg+2fj96xiccjdvjOYOxL1M0mUXz 5Ebw==
X-Gm-Message-State: AD7BkJJbQDpcax36hIegKyeJ4DTX4qOcNUthEWWoqxoJJ6OG3WMfLV+chzNFBuIIy8Ptf2PbjUb0RPbAKB+fqg==
MIME-Version: 1.0
X-Received: by 10.28.136.19 with SMTP id k19mr353641wmd.11.1458319885149; Fri, 18 Mar 2016 09:51:25 -0700 (PDT)
Received: by 10.194.41.131 with HTTP; Fri, 18 Mar 2016 09:51:25 -0700 (PDT)
X-Originating-IP: [192.149.252.11]
In-Reply-To: <CA+mwktJh+bh9U-T9Vcs5akjNO7ZyqgAibKQVg_tSa0Bye1A2SQ@mail.gmail.com>
References: <CA+mwktLxkDuGXGm083N4WK05mNVPg6R5SQ_5b5X5GckJR-mF2w@mail.gmail.com> <CAAQiQRdajFBwcLP+HxAjKE5v+1qX3DC4kS0piRO5VqKaTm5pyQ@mail.gmail.com> <CA+mwktJh+bh9U-T9Vcs5akjNO7ZyqgAibKQVg_tSa0Bye1A2SQ@mail.gmail.com>
Date: Fri, 18 Mar 2016 12:51:25 -0400
Message-ID: <CAAQiQRfHHPog3pDeigpMQJ6s8a6Hf0TjES-hK+gu5fqEu+X6Jg@mail.gmail.com>
From: Andrew Newton <andy@hxr.us>
To: Daniel Parker <danielaparker@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/g5m5XABi5AWHW-6Sp-RV2AGtY_M>
Cc: JSON WG <json@ietf.org>
Subject: Re: [Json] JSON Content Rules -05
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Mar 2016 16:51:29 -0000

Daniel,

I like your suggestion. We'll look into it.

-andy

On Fri, Mar 18, 2016 at 12:09 PM, Daniel Parker <danielaparker@gmail.com> wrote:
> Hi Andy,
>
> Thanks for the response, looking forward to -06.
>
> Regarding distinguishing value rules and name rules, value rules starting
> with a quote or a number are straightforward to distinguish, and couldn't
> "integer", "true", "boolean", etc be treated as names of built in rules, so
> not necessary to distinguish?
>
> In any case, thank you very much for the work you've put into this
> specification, it's very much appreciated.
>
> Best regards,
> Daniel
>
> On Fri, Mar 18, 2016 at 10:50 AM, Andrew Newton <andy@hxr.us> wrote:
>>
>> Daniel,
>>
>> Actually we realized that too. The -06 version, which should be out
>> soon, has an updated ABNF to allow the colon before object and array
>> rule definitions.
>>
>> However, it is still needed for value rules so a parser can tell the
>> difference between a value rule and a rule name.
>>
>> -andy
>>
>> On Fri, Mar 18, 2016 at 10:29 AM, Daniel Parker <danielaparker@gmail.com>
>> wrote:
>> > Regarding JCR - 05
>> >
>> > http://www.ietf.org/id/draft-newton-json-content-rules-05.txt
>> >
>> > Is there anything about the JCR grammar that requires the colon
>> > character to
>> > be used as a prefix to a value rule, as opposed to simply being a
>> > name-rule
>> > separator in an object rule?
>> >
>> > For example, to my eye, the example
>> >
>> > {
>> >
>> > "Image" {
>> >          width, height, "Title" :string,
>> >          "Thumbnail" { width, height, "Url" :uri },
>> >          "IDs" [ *:integer ]
>> >        }
>> > }
>> >
>> > width "Width" : 0..1280
>> > height "Height" : 0..1024
>> >
>> > would look more "JSON like" written as
>> >
>> > {
>> >
>> > "Image" {
>> >          width, height, "Title" :string,
>> >          "Thumbnail" : { width, height, "Url" :uri },
>> >          "IDs" [ *integer ]
>> >        }
>> > }
>> >
>> > width "Width" : 0..1280
>> > height "Height" : 0..1024
>> >
>> > and similarly
>> >
>> > the_bradys [ parents, children ]
>> >     children ( :"Greg", :"Marsha", :"Bobby", :"Jan" )
>> >
>> >        parents ( :"Mike", :"Carol" )
>> >
>> > would look more "JSON like" written as
>> >
>> > the_bradys [ parents, children ]
>> >       children ("Greg", "Marsha", "Bobby", "Jan" )
>> >        parents ( "Mike", "Carol" ).
>> >
>> > Thanks,
>> > Daniel
>> >
>> >
>> >
>> > _______________________________________________
>> > json mailing list
>> > json@ietf.org
>> > https://www.ietf.org/mailman/listinfo/json
>> >
>
>