Re: [Json] JSON "Number" interoperability issues

Anders Rundgren <anders.rundgren.net@gmail.com> Mon, 23 April 2018 06:25 UTC

Return-Path: <anders.rundgren.net@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 6188F124BFA for <json@ietfa.amsl.com>; Sun, 22 Apr 2018 23:25:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1
X-Spam-Level:
X-Spam-Status: No, score=-1 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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no 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 i5tD0fC3b94R for <json@ietfa.amsl.com>; Sun, 22 Apr 2018 23:25:33 -0700 (PDT)
Received: from mail-wr0-x22e.google.com (mail-wr0-x22e.google.com [IPv6:2a00:1450:400c:c0c::22e]) (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 300E71270AB for <json@ietf.org>; Sun, 22 Apr 2018 23:25:33 -0700 (PDT)
Received: by mail-wr0-x22e.google.com with SMTP id h3-v6so37795473wrh.5 for <json@ietf.org>; Sun, 22 Apr 2018 23:25:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cifOJygfz0/AC6MdnJVobasC2TZjbd3yTSgOSe14704=; b=tuI5MdCAg3gC/jdfZGmWTYzuDjX+OdLwYCoX2hj/5EKibYGqkym2/yzbmHzPlJtuK+ 73pHMBCleuLacKZkW3k5uWUdumtornPMawSYtgKNe5Ese5hRuD/ywcF6p3xhcE+4rtgi FQong5JVD1nipo5YTipCnGWDAWXL7/FHpORLIwHgYrwZh7Lem5vqVmNuriph1MKma76X si7o5zwoxxokgNV6DSCw1hQsn7mhvm27XEk49zj67FhnpIbxknmwBsj+JSFIsVVRsqqI MpWb3RlJvXlzPtf0WHQrYBMBQIvw+Vmvwecnql/miqH/J1IW+9uam2q4yza+zkPJEfaE ilXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cifOJygfz0/AC6MdnJVobasC2TZjbd3yTSgOSe14704=; b=KuaRk8wkW5tpI8J1No4oTgWIyNs1aCFgTL6tAYt5NUbUqMIFtt6H6tSBRFc2vM7WnU me1ixpK2BL6/gVsaPcHbQ1Kvl34Ebxtrr23gUR5Jq0ByzBx0X/wAL53gUUWoX7ZNbEwa c4DiOiO9dioF0SGEdL1KDUP5VI+KPQ/xzqgimniWCzXd5Cpe2bqbyowJS/BFvC10WGjZ ZvljhGuXrPX3my618tK6EKNaI5CWOOlwS93XUWaL0S4MnCGvRhZoIGxGpmY1hpR9kyqO +uHHoabbq66633wxdBuHHnCHtw2nTKvakfai03oyBHSTtVqTkq/3+Rfh8N+aHRWz1Rt1 4jaQ==
X-Gm-Message-State: ALQs6tC/2xOyAjPTYyub+VUSfGaKzNy0i8eNGF7zga0GfpQxe+90fMOz VHqDLiKEcrGmfy5UWdkTsOKCsw==
X-Google-Smtp-Source: AIpwx48yqjtexU6kwhcC4FhX6uhHMmqGXKG5gGr0dzjRBUGivWEzvpUzwfBsOQiWjTw0zO5glvYyGw==
X-Received: by 10.80.215.7 with SMTP id t7mr26800453edi.104.1524464731283; Sun, 22 Apr 2018 23:25:31 -0700 (PDT)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id b43sm7670410edc.34.2018.04.22.23.25.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Apr 2018 23:25:30 -0700 (PDT)
To: Henry Andrews <henry@cloudflare.com>
Cc: "json@ietf.org" <json@ietf.org>
References: <0326c065-543c-bc78-8c18-d0d9c1d6e0c1@gmail.com> <CAHBU6itfQJgfnFximgQPbFDyt9gNfVTcZW+4b2hWCjCAokbb7g@mail.gmail.com> <CANp5f1PYeyoP1SwtCOaMexk4AcasA9vBtSk507NRVPnDHo0F8g@mail.gmail.com> <d6d369bd-d823-2bc6-b4c1-5fb1d8c2ba18@gmail.com> <CANp5f1Ntjam83tdVmtP+orizRhz_gZrQHYj6UswyC40QgCfymg@mail.gmail.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <f567b634-945d-eb9f-e083-f7bdfb92e1c3@gmail.com>
Date: Mon, 23 Apr 2018 08:25:25 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <CANp5f1Ntjam83tdVmtP+orizRhz_gZrQHYj6UswyC40QgCfymg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/uc3SFRLrWLEh_yulTv4NX-adikg>
Subject: Re: [Json] JSON "Number" interoperability issues
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: Mon, 23 Apr 2018 06:25:35 -0000

I'm just saying that the JSON community has interoperability issues:
https://github.com/javaee/jsonb-spec/issues/80#issuecomment-383465639

I wouldn't characterize interoperable solutions as JSON "subsets".
 From an application writer's point of view OpenAPI is more of a subset since it out-of-the-box doesn't support BigInteger which Java and .NET do.

Anders

On 2018-04-22 20:21, Henry Andrews wrote:
> JSON Schema provides tools to describe how people use JSON documents, including imposing structural constraints.  While you could write a schema describing the subset of JSON that you wish to use as your "standard", that would be a *use* of JSON Schema, not *part* of JSON Schema.
> 
> Anders, you seem to want JSON Schema to prevent people from using things that are technically allowed by the spec (as Carsten noted, "allowed" in the sense that no one will stop you, not in the sense that any reasonable person would expect a positive outcome).  That is not what JSON Schema, *as a project*, is for.  You are more than welcome to use JSON Schema in your own project to advocate for a more interoperable subset of JSON.
> 
> The section of JSON Schema's validation specification that you reference, about the values for "format", has gotten some discussion around how to manage larger extensibility question such as defining a registry.  The issue for that discussion is https://github.com/json-schema-org/json-schema-spec/issues/563
> 
> Furthermore, this email list is not the right forum for discussing changes to JSON Schema.  This group has previously made it pretty clear that they are at most interested in JSON Schema as one of many possible starting points for a new effort, rather than developing JSON Schema itself into a standards track RFC.  I have no objection to that- the IETF is welcome to use or not use our work in whatever way makes sense.  I've never gotten anything to RFC myself, and wouldn't presume to know all of the considerations involved.  I'll be happy to support anyone who wants to use any JSON Schema ideas in a new effort, but if we're talking about JSON Schema as it is, that's better done through our repo or slack channel.
> 
> thanks,
> -henry
> 
> henry@cloudflare.com <mailto:henry@cloudflare.com>
> andrews_henry@yahoo.com <mailto:andrews_henry@yahoo.com>
> 
> 
> On Sun, Apr 22, 2018 at 3:27 AM, Anders Rundgren <anders.rundgren.net@gmail.com <mailto:anders.rundgren.net@gmail.com>> wrote:
> 
>     Since the JSON Number universe outside of IEEE-754 double precision has been left to application/platform developers to deal with [*], there are currently multiple incompatible (or incomplete) "standards" out there:
>     https://github.com/OAI/OpenAPI-Specification/issues/845#issuecomment-378139730 <https://github.com/OAI/OpenAPI-Specification/issues/845#issuecomment-378139730>
>     https://github.com/javaee/jsonb-spec/blob/master/spec/spec.pdf <https://github.com/javaee/jsonb-spec/blob/master/spec/spec.pdf>
> 
>     For .NET I haven't been able obtaining any public information on this topic, so I wrote some code in order to find out what it actually does.
> 
>     Maybe JSON Schema could serve a suitable place for defining a [potential] "real/de-facto" standard?
> 
>     To make such a process even smother, I could imagine moving http://json-schema.org/latest/json-schema-validation.html#rfc.section.7.3 <http://json-schema.org/latest/json-schema-validation.html#rfc.section.7.3> into a separate document but I haven't looked into the consequences of that.
> 
>     Anders
> 
>     *] https://www.ietf.org/mail-archive/web/json/current/msg04294.html <https://www.ietf.org/mail-archive/web/json/current/msg04294.html>
> 
> 
> 
> 
> -- 
> 
>   *
>     |
> 
>     *Henry Andrews*  |  Systems Engineer
>     henry@cloudflare.com <mailto:henry@cloudflare.com>
> 
>     <https://www.cloudflare.com/>
> 
>     1 888 99 FLARE  | www.cloudflare.com <https://www.cloudflare.com/>
> 
>     |
> *
>