Re: [Json] JSON Schema Language

Nico Williams <nico@cryptonector.com> Sun, 05 May 2019 16:36 UTC

Return-Path: <nico@cryptonector.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 0DE33120148 for <json@ietfa.amsl.com>; Sun, 5 May 2019 09:36:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.101
X-Spam-Level:
X-Spam-Status: No, score=-0.101 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cryptonector.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 7lgQ_9DrzZMO for <json@ietfa.amsl.com>; Sun, 5 May 2019 09:36:33 -0700 (PDT)
Received: from orchid.birch.relay.mailchannels.net (orchid.birch.relay.mailchannels.net [23.83.209.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 13A9112002E for <json@ietf.org>; Sun, 5 May 2019 09:36:32 -0700 (PDT)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DC2FA125A07; Sun, 5 May 2019 16:36:31 +0000 (UTC)
Received: from pdx1-sub0-mail-a12.g.dreamhost.com (unknown [100.96.11.48]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8119B1259B4; Sun, 5 May 2019 16:36:31 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from pdx1-sub0-mail-a12.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Sun, 05 May 2019 16:36:31 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com
X-MailChannels-Auth-Id: dreamhost
X-Keen-Thoughtful: 1d9c8264793964b8_1557074191698_2305547773
X-MC-Loop-Signature: 1557074191698:3826866540
X-MC-Ingress-Time: 1557074191698
Received: from pdx1-sub0-mail-a12.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTP id 42D318019F; Sun, 5 May 2019 09:36:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=uQ1PWyeOeLAVlg ueG16GxkaqTic=; b=OoxsOobp0/jTbdREBi/0q972oHTO1OjOQhkao0rX4wjNua ZorzhpfF/I9hdQSEB5L7JoZjuxf4zS7KuCvuWEJZYnZckzFymSnNluEfFOnFtKFk /pu/kRBkJQN43iuuCn+XW2C12i7tFseJPxg+z8S0RS02Zhhv1DbC4cis30zA0=
Received: from localhost (unknown [24.28.108.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTPSA id 163CB801B3; Sun, 5 May 2019 09:36:29 -0700 (PDT)
Date: Sun, 05 May 2019 11:36:27 -0500
X-DH-BACKEND: pdx1-sub0-mail-a12
From: Nico Williams <nico@cryptonector.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Cc: Ulysse Carion <ulysse@segment.com>, json@ietf.org
Message-ID: <20190505163626.GC21049@localhost>
References: <CAJK=1RjV1uv0eOdtFZ8cKn-FfCwCiGP5r2hOz1UamiM6YV4H1A@mail.gmail.com> <39682ec8-f993-a44c-d3e2-1638d2c1608f@gmail.com> <20190505053921.GA21049@localhost> <ac285e33-0ddc-3b96-fb50-de9b65f40c0e@gmail.com> <20190505070023.GB21049@localhost> <56070772-de6f-2553-94c0-df75c08b4c80@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <56070772-de6f-2553-94c0-df75c08b4c80@gmail.com>
User-Agent: Mutt/1.9.4 (2018-02-28)
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrjeehgdduuddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfhfgggtuggjfgesthdtredttdervdenucfhrhhomheppfhitghoucghihhllhhirghmshcuoehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmqeenucfkphepvdegrddvkedruddtkedrudekfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplhhotggrlhhhohhsthdpihhnvghtpedvgedrvdekrddutdekrddukeefpdhrvghtuhhrnhdqphgrthhhpefpihgtohcuhghilhhlihgrmhhsuceonhhitghosegtrhihphhtohhnvggtthhorhdrtghomheqpdhmrghilhhfrhhomhepnhhitghosegtrhihphhtohhnvggtthhorhdrtghomhdpnhhrtghpthhtohepnhhitghosegtrhihphhtohhnvggtthhorhdrtghomhenucevlhhushhtvghrufhiiigvpedt
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/Vo7MFkAnnGJ_i7eEC7zeioQZyqs>
Subject: Re: [Json] JSON Schema Language
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
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: Sun, 05 May 2019 16:36:35 -0000

On Sun, May 05, 2019 at 09:12:05AM +0200, Anders Rundgren wrote:
> On 2019-05-05 09:00, Nico Williams wrote:
> > On Sun, May 05, 2019 at 07:52:18AM +0200, Anders Rundgren wrote:
> > > On 2019-05-05 07:39, Nico Williams wrote:
> > > > On Sat, May 04, 2019 at 06:47:35AM +0200, Anders Rundgren wrote:
> > > > > Example: although 10.0 is a valid JSON Number, in system where you expect
> > > > > an integer, this should be flagged as a syntax error.
> > > > 
> > > > As a maintainer of one popular implementation, this idea that having a
> > > > zero fractional part makes a number non-integer annoys me a great deal.
> > > 
> > > As I described, this is incompatible with other popular
> > > implementations like Jackson for C#.
> > 
> > That sounds like a bug in Jackson.
> 
> It also flags numbers that doesn't fit into the declared type.

That's a different story.

An application may not have control over what its encoder does here, but
it will have control over the semantic values.  So if a value is
expected to be an integer between 0 and 9, inclusive, then 10.0 is not
valid.  But 9.0 must be because there can be and almost certainly are
encoders that will output integers with a zero fractional part.

Nico
--