[Json] JSON Content Rules

Daniel P <danielaparker@gmail.com> Tue, 23 January 2018 22:13 UTC

Return-Path: <danielaparker@gmail.com>
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 52BB312D855 for <json@ietfa.amsl.com>; Tue, 23 Jan 2018 14:13:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 XgrEhaOkCrmZ for <json@ietfa.amsl.com>; Tue, 23 Jan 2018 14:13:36 -0800 (PST)
Received: from mail-ot0-x232.google.com (mail-ot0-x232.google.com [IPv6:2607:f8b0:4003:c0f::232]) (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 2582C12D859 for <json@ietf.org>; Tue, 23 Jan 2018 14:13:36 -0800 (PST)
Received: by mail-ot0-x232.google.com with SMTP id t20so1846980ote.11 for <json@ietf.org>; Tue, 23 Jan 2018 14:13:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=2ijLuIMzY/BVjRkDYgfp+iQmb8dtK7Mgdm0mbWFFIJI=; b=cELJoPkxrFEvsGGrfSD37AyFlO7h7T0o6/l7w4k8iw0NvxwOpivMlGrmg+SZrXY8pT ZwNTqFNCvgjK5JxC6j5GtlYpCCL9gz7ZIY0/N/mauJkELMXy7ScSQBjGw1WFkFByt574 51wKBQAs5kMk0U9JpXqrKOex+s5VCMkSjCS7epOjxvA+caUhj/C+jeKbBJze9D5M0TLi PA1kQ7dJWIol6cHez3UM0fh5MdXqIuqote6YkXLuqTsQldlnjVxFDFJpFF6M5ISeB6ry e1WQloGMQpqBeM2AlouFmMURo+tgFM254NofV5QSgPDNMa5QYxjTxZs96x7oBod/MJmV Arug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2ijLuIMzY/BVjRkDYgfp+iQmb8dtK7Mgdm0mbWFFIJI=; b=kmfbGdGkdvMpcwSDMCr7cUIcpEJZwwQALYfH5a/XHPwet0kQxeYLLHq/ALbS6TqMCV dP7zqc8uFiqwDgFvU1+mcD6xc9i7amBprszpWqWKrN9Yge1QSpjKnp69IiuntR2/MeXK au+aa3n+3fec6gUtt9arayeclsUoJ6AVqMsl6P11kNNmwHIl+g2xEtjUKokBESxIYYh6 nFy2tTplTgDv4PjLNsG7bHT7xHj/hLwZJfUCflM3lrNLkRzWceMB/ITcRFnuSft2JF/N mmUszQmitCuff65lcCxcJYAJyXvXvIOh8onfICcLh8fNCbyhCkcLIKzXX7Atj+F2d4PF OdMg==
X-Gm-Message-State: AKwxytfaUL5EJk0bdpBQP0jiIKsWotofyGngMb6hbjQuCHZhpNByJXq4 SeAPkA0I7OeTTCWECoSNSCApWqdl2pQhtPn0ogGfSg==
X-Google-Smtp-Source: AH8x224TOnmaKMdTHWWTKtUhEDzE9ZnZF9HY97fwIYNzMIgkw83WZM+dzufVd8FsUGa1UoFEKkzKwMR9eGPOUdcxAHI=
X-Received: by 10.157.89.203 with SMTP id u11mr8632618otg.319.1516745615283; Tue, 23 Jan 2018 14:13:35 -0800 (PST)
MIME-Version: 1.0
Received: by 10.157.27.139 with HTTP; Tue, 23 Jan 2018 14:13:34 -0800 (PST)
From: Daniel P <danielaparker@gmail.com>
Date: Tue, 23 Jan 2018 17:13:34 -0500
Message-ID: <CA+mwktJU4xVHxRzgd=dcCKvUv3Om3qeBEhqTaW2sniLQ95+QDA@mail.gmail.com>
To: JSON WG <json@ietf.org>
Content-Type: multipart/alternative; boundary="f4030435be949d1e09056378dbf3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/zJDC6UtP0fIhVWeU-gF9Ig-RVYE>
Subject: [Json] JSON Content Rules
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 23 Jan 2018 22:13:38 -0000

Hello everyone,

I would like to solicit feedback from members of this forum on one feature
of the JSON Content Rules specification, draft 09
<https://datatracker.ietf.org/doc/draft-newton-json-content-rules/?include_text=1>,
as I'm considering to build an implementation.

The specification states: "There are two forms of rule name assignments:
assignments of  primitive types and assignments of all other types.  Rule
name assignments to primitive type specifications [e.g. string] separate
the rule name from the type specification with the character sequence '=:',
whereas  rule name assignments for all other type specifications [e.g.
array] only require the separation using the '=' character ... This syntax
is necessary so  that JCR parsers may readily distinguish between rule name
assignments involving string and regular expressions primitive types and
member names of member specifications."

An example (I hope I have this right):

{ $bar-name : $bar-val, "foo" : $foo-val }

; member name specification
$bar-name = /^bar[0-9]$/

; primitive type specification
$foo-val =: "foo"

; non primitive type specification
$bar-val = [ integer, integer, integer ]

In what otherwise appears to me to be a fairly clean specification, I'm
having some difficulty digesting this syntax, with "=" if such and such,
and "=:" if so and so. I would be interested if anyone else on this list
has any thoughts about this.

Thanks,
Daniel Parker
https://github.com/danielaparker/jsoncons