Re: [Json] Schemas & so on

Phillip Hallam-Baker <ietf@hallambaker.com> Tue, 03 May 2016 18:15 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 9DB1712D86F for <json@ietfa.amsl.com>; Tue, 3 May 2016 11:15:13 -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 Qs9gVZHdBK9j for <json@ietfa.amsl.com>; Tue, 3 May 2016 11:15:08 -0700 (PDT)
Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::22a]) (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 48A8212D874 for <json@ietf.org>; Tue, 3 May 2016 11:13:45 -0700 (PDT)
Received: by mail-qk0-x22a.google.com with SMTP id n63so12910845qkf.0 for <json@ietf.org>; Tue, 03 May 2016 11:13:45 -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=5b2y69sVOIi4ucpMcLmpr8LOh7SaSY/7j7O2xLZ2ZXU=; b=i11WG83VcfoKPQ5oEsXseooM9XAzWi7s8u6tNZ1l9SQohPajeeNm5ty9S6aFipef8T paJJ+Vuwtic3B9HCt36MxJ96hJxIPDsPpo1mgy2ztokA1ot0QXJ7NHUvE5R/Y8h03aIU 0KPEDtsank6HCdrInPiYmoCNGNoY3oFiOhUGNRZNpLUS38hfNTmwnVqBJLJyqrsca7py JxLxVxNcs9CE1eZFIpm4MvksRbbQImx8PF/X6DevArRac14/ZYoxn8WeY6eH+tEaz6A2 6YJrSI0TebJtOqKmLcdXQo9RXJKAIcEG3a1Sc6s6f+BerVOMqq8N06YJd8EShhJVwJBO JQkw==
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=5b2y69sVOIi4ucpMcLmpr8LOh7SaSY/7j7O2xLZ2ZXU=; b=TTWhPwjrefrQgNgFQeS4gI1CB21eyZRPYVZIWWNPktSMOguoogP7x9GQUwMHLC725c y/YD4hhBa52Yqe/86U+mmfnRono1vMrsSPwMtu0GqnLV9MoMxrS/pxvXm6BRGtoJafyf BLVX8xnOb67tcaGr44ntF8IZYDxx9ZDBP4R+9JwAKKO31Luz2A6M3CpzvWyTAbugvO60 okiN4MQLun6jtoe87ZIZfezsICqI3t0yN7jZ6lrlFifp9iow+y8dpKm/2TwfrAUYdbEr alxgWdw9G2lR0uKg72UQhGft2c6VBKJKceNdV8IEiIWj1kjCs+Wcwh8TC+GQjT57sEwd xeWA==
X-Gm-Message-State: AOPr4FWrRyHXjOvJM0SMzTrWzzvRcU+tWOkRpgDZiswBlN6eT7DYiOt8vqUFDhRpyy+ygUFvuEbLZFlcEHDf+w==
MIME-Version: 1.0
X-Received: by 10.55.114.71 with SMTP id n68mr4408793qkc.37.1462299224386; Tue, 03 May 2016 11:13:44 -0700 (PDT)
Sender: hallam@gmail.com
Received: by 10.55.24.38 with HTTP; Tue, 3 May 2016 11:13:44 -0700 (PDT)
In-Reply-To: <20160503181004.GA20065@mercury.ccil.org>
References: <CAHBU6itCV9MXmALdKtE9-vjUPG6-6ZqdqzrmZkcEzSUysi3S-w@mail.gmail.com> <AC93811D-A16A-4527-B2EB-C6A9FC6D4F17@mnot.net> <20160503010109.GA17482@mercury.ccil.org> <CAMm+LwjVnh5H4REM9tUJjb7QvL2arxjkhjWybHerxbXUvkcMdA@mail.gmail.com> <20160503172537.GM29513@mercury.ccil.org> <77fdbae1-98cd-96cc-64e3-7ad321433684@dret.net> <20160503181004.GA20065@mercury.ccil.org>
Date: Tue, 03 May 2016 14:13:44 -0400
X-Google-Sender-Auth: VX4xL-sOTLB5IBXjdgTlORr57dE
Message-ID: <CAMm+LwhOvOV+sTW3wKZwPoXNxp7GdxDrMTxvVttECYW5D+mBxg@mail.gmail.com>
From: Phillip Hallam-Baker <ietf@hallambaker.com>
To: John Cowan <cowan@mercury.ccil.org>
Content-Type: multipart/alternative; boundary="001a114fef8ad3306e0531f411bf"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/-HT8pYPjCqzoy_5C_cu4CD2QQB0>
Cc: Mark Nottingham <mnot@mnot.net>, "json@ietf.org" <json@ietf.org>, Tim Bray <tbray@textuality.com>, Erik Wilde <erik.wilde@dret.net>
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: Tue, 03 May 2016 18:15:13 -0000

Not in JSON. No leading zeros. The only integer that starts with a zero is
zero.

(unless json.org has it wrong).

On Tue, May 3, 2016 at 2:10 PM, John Cowan <cowan@mercury.ccil.org> wrote:

> Erik Wilde scripsit:
>
> > when it comes to datatypes and how values are being used, things get
> > complicated relatively quickly. for example, even if you allow
> > 0..255 as the datatype for a member, would it still be permissible
> > to use "0000000000000042" as its value? it depends, right?
>
> Of course it would be permissible.  42 is 00000000042 is 42.00000.
>
> > this is the part where XSD took a deep dive (making it complex but
> > powerful) and separated the lexical space and the value space:
>
> I agree that this has to be done, but I think that JSON is simple enough
> that the mapping is self-evident.
>
> --
> John Cowan          http://www.ccil.org/~cowan        cowan@ccil.org
> It's the old, old story.  Droid meets droid.  Droid becomes chameleon.
> Droid loses chameleon, chameleon becomes blob, droid gets blob back
> again.  It's a classic tale.  --Kryten, Red Dwarf
>