Re: [Json] Schemas & so on

Phillip Hallam-Baker <ietf@hallambaker.com> Wed, 04 May 2016 15:11 UTC

Return-Path: <hallam@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 6D53512D71E for <json@ietfa.amsl.com>; Wed, 4 May 2016 08:11:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.399
X-Spam-Level:
X-Spam-Status: No, score=-2.399 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.199, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-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 qxXt4uxgBYAf for <json@ietfa.amsl.com>; Wed, 4 May 2016 08:11:06 -0700 (PDT)
Received: from mail-qg0-x230.google.com (mail-qg0-x230.google.com [IPv6:2607:f8b0:400d:c04::230]) (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 94FEB12D6D7 for <json@ietf.org>; Wed, 4 May 2016 08:10:05 -0700 (PDT)
Received: by mail-qg0-x230.google.com with SMTP id f74so24748704qge.2 for <json@ietf.org>; Wed, 04 May 2016 08:10:05 -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:date:message-id:subject :from:to:cc; bh=+HPOIDiX+MySRQKbWvLHmDLUZFH6/2daF8oKZJfMvsI=; b=dirUDHDauceNfCaZnMvieULGpZfVj3oPNesjE9Ix+yECh15utlSSBLAyQ6B9A+QW2J WFncsupXocLoK8jqCQXxRcLXkPco9Xyw6tEMKnQu41Xws+Jh1To3nBc8EiK8N6W9HDcI P/wRn0TxJIDLF8EysI4gBXxPnsQyA6HgU4+l+a0ZkoSYO+oFJg0H13538p5YXE/RNuh7 F1bQPyQeoqrNpF2EdVKJP16GCPnhAsvp7kWZ6TnZBOb49TmKgsrROnGoapvYGIjEtOq/ pSPHa2ynwfpp/5wIX0tNV9lac8IK4Z4DnJs8Kkrrb836WuPrd9Q8F8Zmvn6RTzDtdq1P /nSA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=+HPOIDiX+MySRQKbWvLHmDLUZFH6/2daF8oKZJfMvsI=; b=iX2Q7TL1azESBh0abkcGzFl6PMIKj62nJtFR8onJ4xC5CETkMQzXKktSrS9KgEvgYe E0BwMriBtpLOUdCKG2BCI/WnltI4UbN4G8j4g2wwADh+dWv9Y5Gg2W3ObNIK8Sa+G++7 lvppIIe9S1K3Rjjgr5UjhPHuzKxZ2ToPf1ClFXAj5HaZ3ryq/IkRaNZRFHq5MXRYuRVq pfh/lAFgcDWcnTFwWnDGXtRVX61cPSxquZV4gQ0nKTynNOqkwJolJ+H4h6RDdpR8V0rI 8gjrFHC45d3KUXwF2XipxzmjglfB2nlM43L48H/HpT+NfzSFmz/K83cOqIWWarYOJP8s Mxbw==
X-Gm-Message-State: AOPr4FUqWZdcs67rqyTKrr0B92FuPehnMr/BjWVe/JpeAqzZyj7js4Y8pmSMt42Jnr7IzJL5a+dMBADoULHrLA==
MIME-Version: 1.0
X-Received: by 10.140.41.200 with SMTP id z66mr8753659qgz.20.1462374604745; Wed, 04 May 2016 08:10:04 -0700 (PDT)
Sender: hallam@gmail.com
Received: by 10.55.24.38 with HTTP; Wed, 4 May 2016 08:10:04 -0700 (PDT)
In-Reply-To: <20160504150050.GG6756@mercury.ccil.org>
References: <CAHBU6itCV9MXmALdKtE9-vjUPG6-6ZqdqzrmZkcEzSUysi3S-w@mail.gmail.com> <AC93811D-A16A-4527-B2EB-C6A9FC6D4F17@mnot.net> <CAHBU6iuxaoXvNncw5_8uNaKf5zi+JEw3xhmA_iPN6OVWc+xCcQ@mail.gmail.com> <CAMm+Lwh0TfOuU5dXMAnY8YP1QHHTwhZs2mkgdbjcQ7sLukSX8w@mail.gmail.com> <20160503190957.GB6756@mercury.ccil.org> <CAMm+LwjWhO3zJcE+ktjJNh82D0_P5hH-=u_tYPus50Y7H2Vx=g@mail.gmail.com> <20160503195037.GC6756@mercury.ccil.org> <CAMm+Lwh=Ms8-sfurHVJbA9iG-4xx-DJ92kFwyWJHvGAzNQOQiw@mail.gmail.com> <20160504150050.GG6756@mercury.ccil.org>
Date: Wed, 04 May 2016 11:10:04 -0400
X-Google-Sender-Auth: XUgWDFS5P66MTislUuB0G3Mq6ns
Message-ID: <CAMm+LwikrP4sMboBXSWUKo2KFDRvU_0-AcCTO92xffBKXJ89CA@mail.gmail.com>
From: Phillip Hallam-Baker <ietf@hallambaker.com>
To: John Cowan <cowan@mercury.ccil.org>
Content-Type: multipart/alternative; boundary="001a11c13b84d83de80532059e19"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/dRGs4C4f-mCCIimLDGHxImy1ESA>
Cc: Mark Nottingham <mnot@mnot.net>, Tim Bray <tbray@textuality.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Schemas & so on
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: Wed, 04 May 2016 15:11:13 -0000

On Wed, May 4, 2016 at 11:00 AM, John Cowan <cowan@mercury.ccil.org> wrote:

> Phillip Hallam-Baker scripsit:
>
> > I don't allow number or string or see the need.
>
> It comes up precisely when you have a bignum and want to send it out
> as a JSON number if you can, a JSON string if you must.
>

As I said before, I would add BigNum to the schema as a separate type, just
like binary and DateTime.

Could do the same for real32 and real64 of course.


What I think we are converging on is the idea of a schema that extends the
type system of the data model but not the JSON encoding.