Re: [Json] JSON Schema Language

Austin Wright <aaa@bzfx.net> Mon, 06 May 2019 21:40 UTC

Return-Path: <aaa@bzfx.net>
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 B4654120175 for <json@ietfa.amsl.com>; Mon, 6 May 2019 14:40:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=bzfx.net
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 e1LoBecUct6B for <json@ietfa.amsl.com>; Mon, 6 May 2019 14:40:12 -0700 (PDT)
Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (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 5A4501200A4 for <json@ietf.org>; Mon, 6 May 2019 14:40:12 -0700 (PDT)
Received: by mail-pg1-x531.google.com with SMTP id h1so7125453pgs.2 for <json@ietf.org>; Mon, 06 May 2019 14:40:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bzfx.net; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=apfLm5AnMAH/2NanYWtBTMiQZsyR8RGkr2yh0Y0Z7os=; b=MKVZgUMdz5ttzFsRscnYchNQ1CFlbK3AIIVIfWP1KCwLvAcBgIXH1LSFhgTPPyVwNb AXQWWar+ZRoqgaNbR0Mck7nhrWs27Cic3lSbyzlEoKibylNcswys7uwlbhN1l1EXuAUl PIclXwIe6hBsQ+uv2JJMLdACMrKRCKul0sqPw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=apfLm5AnMAH/2NanYWtBTMiQZsyR8RGkr2yh0Y0Z7os=; b=I9dOxajm0371BKqq2ozqD0hm2ye7gwFV5whlFW5nQKTTMMF0yd3YmRyZgkHi8OZTQ1 068Ybd//6mepR5hkaaUb63ntxmlDVkdLOwh9Z633UZvHRoTOWa8Zae2A8YScbqnhO50D 58XPIiKALaTQoymxdjfydjELZB7acv0RaIUPsYoEdtsxOCct5mMc3NjIM0G9mcWPhwoy /FA8dWWttSKZFYY4TmZ29LX/mAVJ4fc5BijFs8oQLZFw1IF0o2i0la9dmuFFyBDyA8dl RfscM1dNP4IoltsWv/X0Jz0OGHIOfnZCvcEfeTOdC5lVRzoAT+V9NmaMF9hksrH5lDGQ bfLg==
X-Gm-Message-State: APjAAAWQX4f9A19749OJ4XBUbJq5f9gEDqeeY/qTwxgnJeQOTm/vjaxl DnAOW9wUtDZALI9qs4OT3HJQhQ==
X-Google-Smtp-Source: APXvYqy48EQzuskMiUVpBMriOHbVA4vhIB/jPO2P7dz3tCm68YsVJnFmliqb10Me+NbJ/kdBxatoVw==
X-Received: by 2002:a63:6988:: with SMTP id e130mr35693444pgc.150.1557178811490; Mon, 06 May 2019 14:40:11 -0700 (PDT)
Received: from [192.168.0.116] ([184.101.46.90]) by smtp.gmail.com with ESMTPSA id j22sm14331340pfn.129.2019.05.06.14.40.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 May 2019 14:40:10 -0700 (PDT)
From: Austin Wright <aaa@bzfx.net>
Message-Id: <957CDE65-2987-41A9-B5EB-D54D978B433A@bzfx.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_4FC556CE-4786-4ADE-B1E0-7162103B6FD0"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\))
Date: Mon, 06 May 2019 14:40:08 -0700
In-Reply-To: <20190506213224.GM21049@localhost>
Cc: Carsten Bormann <cabo@tzi.org>, json@ietf.org
To: Nico Williams <nico@cryptonector.com>
References: <D21B379B-23CC-48B3-BE10-D2777308E2E0@bzfx.net> <40f80ea0-d130-3f3b-39fa-2c84e802ed55@gmail.com> <35E2623E-753D-4918-8AF4-BF0BC5DE4868@bzfx.net> <6260354b-aca2-e001-7145-148b32658416@gmail.com> <9D90C1F1-6747-4373-93B0-8D51C5B25F1C@bzfx.net> <751DAC92-D70C-4C5E-9C61-954D6E300A1F@tzi.org> <20190506192453.GK21049@localhost> <753A412B-299F-400F-9D19-A9688068D842@bzfx.net> <20190506211509.GL21049@localhost> <32F23E7E-F3AA-4244-AAEC-4582AE7919B9@bzfx.net> <20190506213224.GM21049@localhost>
X-Mailer: Apple Mail (2.3445.104.8)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/j7ZdgApEiObfU5bh_wKu30ceZf0>
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: Mon, 06 May 2019 21:40:15 -0000


> On May 6, 2019, at 14:32, Nico Williams <nico@cryptonector.com> wrote:
> 
> On Mon, May 06, 2019 at 02:26:43PM -0700, Austin Wright wrote:
>>> On May 6, 2019, at 14:15, Nico Williams <nico@cryptonector.com> wrote:
>>>>> On May 6, 2019, at 12:24, Nico Williams <nico@cryptonector.com> wrote:
>>>>> Because some of us have generic parsers with associated DSLs and we
>>>>> don't want to be left out.
>>>> 
>>>> Left out of what, exactly? See below.
>>> 
>>> Out of interoperating with other applications using this schema thing.
>> 
>> You’ll need to provide a specific example, I think there’s a misunderstanding.
> 
> I did.  Any application that uses an off-the-shelf generic parser and
> encoder and does schema validation in a different step.
> 
>>> I explained how this would preclude use of jq or any other XSLT/XPath-
>>> alike for JSON from interoperating with applications using such a schema
>>> language.
>> 
>> I never suggested this. While JSON doesn’t specify what an “integer”
>> is (i.e. we could define it to be any subset of number that we want),
>> JSON Schema tries to be liberal and specifies that excessive precision
>> still qualifies as an integer. (I’m the one who added that language.)
> 
> Then accept 10.0 as an integer.

The only JSON parsers/JSON Schema validators I maintain are in ECMAScript, and both validate `10.0` as an integer. [1] [2]

If you’re talking about the Newtonsoft JSON parser, or anything else, you should ask them directly. By all means, feel free to copy me on that email or GitHub issue.

Thanks,

Austin.


[1] https://github.com/awwright/jsonschemaparse <https://github.com/awwright/jsonschemaparse>
[2] https://github.com/tdegrunt/jsonschema <https://github.com/tdegrunt/jsonschema>