Re: [Json] JSON Schema Language

Anders Rundgren <anders.rundgren.net@gmail.com> Wed, 08 May 2019 17:01 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 1C2F61202B0 for <json@ietfa.amsl.com>; Wed, 8 May 2019 10:01:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.979
X-Spam-Level:
X-Spam-Status: No, score=-0.979 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, MISSING_HEADERS=1.021, 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 Gu4AL3ciNTeP for <json@ietfa.amsl.com>; Wed, 8 May 2019 10:01:34 -0700 (PDT)
Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 D995B1202C1 for <json@ietf.org>; Wed, 8 May 2019 10:01:25 -0700 (PDT)
Received: by mail-wr1-x443.google.com with SMTP id h4so8884803wre.7 for <json@ietf.org>; Wed, 08 May 2019 10:01:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:cc:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=yhDFbnv9Avd+JaLfki3rEs+MVW4KWrn7gOHHIeEq+F4=; b=gq4PuLfRoaNDw/MoevZu44nYbpm9zZNMKj8oTSMhN3cm+4nX2hWWxnu+7JvAFkHLZ3 Horo6E7MxPsn3vm3tVWQ3u0lowyg8GeakyNtexOJfPrYSoa6CEd/ZfS4W8k4FFLtb6Y1 LOnuMMksFUeW7gc7fUoKhEPP5qYosIVXcd4A9x58RhoVZw6fkpmcYXQquy7K70rwf40i q7m2UhU0lfoNHJd7dQFuFCf+uBH6M6GvLGK3bM99gXwOtYbEggaKNkRJgIUcjwtZ0+I4 N6YJ8yEZuhCEq4dssuqm5UzJgNPJYzc1AGHg0YsGGiTt/2qUdUWjhE7ztvBupRGQ66Y7 KsJg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yhDFbnv9Avd+JaLfki3rEs+MVW4KWrn7gOHHIeEq+F4=; b=tGEk5WynNJc3z0T+48aZlf+jeLho3Nr3x0jmq75zLu8CF+NC8lXpOC06Kzh/vh07Xk OmeY+Es2cyLEbNhKdZimWRHNmvZ0nXkn5K0t28KaCK4fQIbQAeKR99SZVHc6bSwpVMBL BKnAc5jI5YNpb6IhXaE30iYgVz4jAQX4q+9W9ScoqAGtRWuERx7m8MwAqKebkzp6KzRI 1IMe9Xu3Seu72LPd468W8PI5pS/Fj4snX6ER/Cm6pZk6e7yd8XLQZb19vqmp6aabrde4 MfSE3AgMnoaXWCm4PH9ob7wz6oFcEJu6F1butgorCS2coka60h67SX678REVB2nqDy2O 2a3A==
X-Gm-Message-State: APjAAAUZnnYccZrxYU3Kdw9Sw91OxDLWnIsdzd0vjyKSiznZtxqUS2eZ miSclI6DGg3ftHSGoG0PtaDWiN4X3EM=
X-Google-Smtp-Source: APXvYqwJG4a/sKf9XoZfN96+Yz4cBZQNyRo6HvoAKepUaaaSWJAwDNeD/EnZYCLHu23xY3qgrXAiMQ==
X-Received: by 2002:adf:fe10:: with SMTP id n16mr1027265wrr.304.1557334883804; Wed, 08 May 2019 10:01:23 -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 x17sm17752308wru.27.2019.05.08.10.01.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 10:01:22 -0700 (PDT)
Cc: Ulysse Carion <ulysse@segment.com>, Austin Wright <aaa@bzfx.net>, JSON WG <json@ietf.org>
References: <CAHBU6itE8kub1qtdRoW8BqxaOmzMv=vUo1aDeuAr3HX141NUGg@mail.gmail.com> <77994bdb-a400-be90-5893-b846a8e13899@gmail.com> <20190507154201.GP21049@localhost> <CEF72901-5077-4305-BA68-60624DCE952D@bzfx.net> <69ea0c99-e983-5972-c0aa-824ddeecb7c4@dret.net> <CAMm+LwjyVjnJuWE4+a9Ea=_X1uuEGuK+O4KojzN3uVQ+s+HqUQ@mail.gmail.com> <058f58a3-dd27-998e-5f54-4874aff5f2f0@dret.net> <20190507221726.GR21049@localhost> <CAJK=1Rj7PBD-bbwvsqgjQQzp4Aoidb-W2q5Lj6asMHHDHaTVYQ@mail.gmail.com> <702ee54b-9465-7ca8-b521-2a88c1a47785@gmail.com> <20190508160740.GU21049@localhost>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <821ce39a-01a6-8c2c-4323-96b41f4248c7@gmail.com>
Date: Wed, 08 May 2019 19:01:20 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <20190508160740.GU21049@localhost>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/oeK4veAFdqDik7hUK1hJVQX4BPU>
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: Wed, 08 May 2019 17:01:36 -0000

Since I have what appears to be the diametrically opposed opinion,
I'd better leave it there [*].  Flame-wars are kinda boring.

That a stricter interpretation (=subset) could break parsers
is beyond my understanding.  Probably it is because you seem
to plot with a different order of execution.

Or maybe the problem is rather than you want to apply schemas to
existing systems, [almost] irrespective how broken these may be?

In my book you start by validating data (strict) and only if that
works out you dispatch it to your good ol' JSON tools and applications
to digest.  For verifying serializations you would do the opposite.

Anyway, I wish you good luck with your project!

cheers,
Anders

*] I won't respond....

On 2019-05-08 18:07, Nico Williams wrote:
> On Wed, May 08, 2019 at 06:40:14AM +0200, Anders Rundgren wrote:
>> I believe I have stated my opinion but here it is again:
>>
>> The idea is not changing JSON in any way but to add *strictness* to
>> its interpretation.
> 
> That's not an innocent change.  It breaks interoperability.
> 
>> This has ZERO impact on JSON parsers but could in some cases affect
> 
> Not true: it makes them reject more inputs, which makes them less
> interoperable.
> 
>> JSON serialization.
> 
> Exactly, so not OK.
> 
>> There are no problems defining a set of numeric types having a range
>> and syntax that conforms to what is the norm for most programming
>> languages since all of that fits nicely into JSON.
> 
> This is insufficient justification for making JSON parsing more strict.
> 
>> However, assuming that any JSON parser also could be used for
>> *implementing* JSL (including verifying arbitrary input data) will set
>> the bar way too low.
>>
>> Regarding the integer discussion I believe Open API/Swagger which has
>> quite an active and big user community already flags 3.0 as an invalid
>> integer.  A bug report on Open API (or on Jackson) would most likely
>> return "works as intended".
> 
> That's an interop bug.  They should fix it.
> 
> Nico
>