Re: [Json] Possible next work for the WG

Jacob Davies <jacob@well.com> Wed, 16 October 2013 17:53 UTC

Return-Path: <cromis@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 EB7E111E822D for <json@ietfa.amsl.com>; Wed, 16 Oct 2013 10:53:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[AWL=-0.001, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 3CnpvYbvGxDh for <json@ietfa.amsl.com>; Wed, 16 Oct 2013 10:53:12 -0700 (PDT)
Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) by ietfa.amsl.com (Postfix) with ESMTP id A68A621F9D69 for <json@ietf.org>; Wed, 16 Oct 2013 10:53:02 -0700 (PDT)
Received: by mail-qa0-f42.google.com with SMTP id w8so4786066qac.1 for <json@ietf.org>; Wed, 16 Oct 2013 10:53:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=i9CPR1BZYAPlxbKDrb25OFbQlHP2fF0S7tFwwYPZrjE=; b=zyZ5cjUsnbGi/9A7xMTvXZ40MLqIeimDdSi7PXXe0Y8RGoljYiSWtROC8A7eEXx2SI ZdYJ1tLVYykzQ9URql9vm+P7Zq38UUMRiyY3vV+uzaQnWaefh6KfYHRhgfri0PXgH8n1 UeuItn2puBCRD8XfcI/4vRVIx58cd5wGyp/lUtxaLGPfoAxbmpydDK1gmuOu1XnIUCXd wu78s12Uzmp1zpnuhaWRvakbKDAo5uxlQ95VSPW5C8j+HrHX4o4srgSBz5riggAXtewy OuswKh3PEYE0mR2w+lgvhVM4fHGEN+o4QD05nVtNUwtTbWDak12Bbh0TBRO0ox1yBFit Q6xQ==
X-Received: by 10.224.172.132 with SMTP id l4mr6569364qaz.22.1381945982166; Wed, 16 Oct 2013 10:53:02 -0700 (PDT)
MIME-Version: 1.0
Sender: cromis@gmail.com
Received: by 10.49.107.3 with HTTP; Wed, 16 Oct 2013 10:52:42 -0700 (PDT)
In-Reply-To: <20131016165406.GA9701@mercury.ccil.org>
References: <29850F92-23F1-4859-BB5A-BB5F1F20DD38@vpnc.org> <20131016165406.GA9701@mercury.ccil.org>
From: Jacob Davies <jacob@well.com>
Date: Wed, 16 Oct 2013 10:52:42 -0700
X-Google-Sender-Auth: QQbS_Imsgs7_MLZlMesn_shAlic
Message-ID: <CAO1wJ5Ry1poycq=fosp6=gBC6qJ_7YAkPnavxS=OjTy0NdqdQg@mail.gmail.com>
To: John Cowan <cowan@mercury.ccil.org>
Content-Type: multipart/alternative; boundary="001a11c253c05dac2204e8df5ffa"
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, JSON WG <json@ietf.org>
Subject: Re: [Json] Possible next work for the WG
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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: Wed, 16 Oct 2013 17:53:18 -0000

On Wed, Oct 16, 2013 at 9:54 AM, John Cowan <cowan@mercury.ccil.org> wrote:
>> - Canonicalization rules so that two JSON texts can be compared for
equality
>
> I think we should explore this, but it's going to be tricky.

Very tricky if we stick to the idea that JSON is only a text format and
does not describe an abstract data model. Who is to say whether 4.5 and
4.500 were supposed to be equivalent? 0 or -0? Or whether the ordering of
keys in an object matters? (It matters to me that the order is preserved
but not that it is included in equality comparisons, but that's just me.)

> As reinvented wheels are often hexagonal, I think if we are going to
> do this we should adopt draft-zyp-json-schema-04 as a base document
> for further work.  This has now expired, but is still available at
> <
https://raw.github.com/fge/json-schema-validator/master/misc/specs/draft-zyp-json-schema-04.txt
>.

How to phrase this: I would be curious how much actual use is made of JSON
Schema or any other formal schema system for JSON. If there are people here
who've found them useful, I think it would be interesting to discuss what
kinds of uses they made of them.

I don't know the history of JSON Schema but the specific link you point to
is pretty obscure (i.e. provide no actual starting point for using it). An
older draft seems to be a bit clearer:
http://tools.ietf.org/html/draft-zyp-json-schema-03

I find the syntax overly verbose and not very idiomatic - e.g. requiring:

   "name":{"type":"string"},

instead of just "name" : "string", and requiring an intermediate
"properties" element when defining objects, but those could be fixed.