Re: [Json] JSON Schema

Henry Andrews <henry@cloudflare.com> Sat, 20 January 2018 22:13 UTC

Return-Path: <henry@cloudflare.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 57AE612421A for <json@ietfa.amsl.com>; Sat, 20 Jan 2018 14:13:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 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_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cloudflare.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 WFNnL8nIXJKq for <json@ietfa.amsl.com>; Sat, 20 Jan 2018 14:13:26 -0800 (PST)
Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 63FEF1242F5 for <json@ietf.org>; Sat, 20 Jan 2018 14:13:26 -0800 (PST)
Received: by mail-wm0-x22b.google.com with SMTP id b21so9977912wme.4 for <json@ietf.org>; Sat, 20 Jan 2018 14:13:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RLXurAo20PmrIQQxa4AbOBG52He+u8Def154vSPuR0I=; b=qfHc8Rc9EW2xqkP3gw3esetl1ieHZ7p0hu05zIr/8+Y6oq9HfH/6EGWTLa+MF05NvX Y3Fx269oolg/7b4QoZOtbAiUxyULu3n1ujBZ/8xlyWsnoLOBEfpulpvpcg+ZvEXnOLeD CgrOETJUk7APHJ/U2CNo0OCFByGCKtTuRoV8Q=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RLXurAo20PmrIQQxa4AbOBG52He+u8Def154vSPuR0I=; b=kU5BhO4jmSJXHSnmssCy4PBAWd6QUXO6i+d10D7DoHvOv9x4MqwrfqFEulrfnEO8Fh iwxGT5+20dUXEz2H0Ewil56nTVbPn5INgt6JV8PezvqIYGGJK+iWMGtuu+MErJfXfnlu znn4PjUyM7EXJrZQ0H+zSoPljRUm7rUKXzERB3uJG5aW+GbqxKuDEsaY2hbSuXJO26aw cl8EpaME1/i9u5lvt3Q84MSsZXfimprt/JHyNcNndrX462gXwNv4Jii5yYMC1IfKhCyA C14mBqHi0xCBQqVdcseAbnINbbH9nRb6taSJBYB+bqVdvtcmWbOuMeRcDEL3hkzGIYCt gj/w==
X-Gm-Message-State: AKwxyteEjvu3BK2vUulktht4fqhUVFISLGj7o4h2P3CUEYF7st3VIiRr Si/K3mtKWYOiOTKv3RhgOlyVn8XhfgMi2eIPVFwtew==
X-Google-Smtp-Source: AH8x2268BY9D+xwpuCYcnBowPtS0wb6wWdZiRpECxhtQGiFlH1TstoRUUFiutbB39wth5U5FQ408oxPOa5Lxokr74Mo=
X-Received: by 10.28.111.11 with SMTP id k11mr1841934wmc.119.1516486404825; Sat, 20 Jan 2018 14:13:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.28.124.4 with HTTP; Sat, 20 Jan 2018 14:13:04 -0800 (PST)
In-Reply-To: <CAHBU6itya7eiap45=1XsHET7GQYeRtK__GvmadULENrZGNjU1A@mail.gmail.com>
References: <CANp5f1OzPukQ9T69kDaVVTXs0DYdXzY+n=AN6iVRgKKHR4S9CA@mail.gmail.com> <CAHBU6itya7eiap45=1XsHET7GQYeRtK__GvmadULENrZGNjU1A@mail.gmail.com>
From: Henry Andrews <henry@cloudflare.com>
Date: Sat, 20 Jan 2018 14:13:04 -0800
Message-ID: <CANp5f1MQV=AfEo=ROC7bmfg435-7_M5oFyCsoNSD_EYSh0+gqA@mail.gmail.com>
To: Tim Bray <tbray@textuality.com>
Cc: json@ietf.org, Austin William Wright <aaa@bzfx.net>, Ben Hutton <bh7@sanger.ac.uk>
Content-Type: multipart/alternative; boundary="001a1147c446777b9805633c818d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/ahfjkVPTjwnT-WXMnTvM6DDyXfI>
Subject: Re: [Json] JSON Schema
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: Sat, 20 Jan 2018 22:13:33 -0000

Hi Tim,
  The current draft is draft-07 (although the actual IETF numbering is
complicated).  So draft-02 was a very long time ago :-)

You can find links to nice HTML renderings of all of the drafts, as well as
links to the official ietf.org hosted renderings, on our site at
http://json-schema.org/ (yes, we know we need to move to HTTPS, there's a
long difficult story there that is finally showing signs of resolution).
You will also find some guides to migrating to recent drafts and a bit of
explanation of the history, although we could use more/improved content on
those topics.  You will also find links to implementations, with notes
about which drafts are supported- draft-06 (April 2017) has been
implemented in several languages, and we're starting to see a few draft-07
(November 2017) implementations as well.

For discussions of improving or standardizing output (error or otherwise),
follow the "output" tag on the GitHub issues:
https://github.com/json-schema-org/json-schema-spec/issues?q=is%3Aissue+is%3Aopen+label%3Aoutput
While not an immediate focus, it is obviously on the list of concerns.  In
my view it is the responsibility of the spec to ensure that it is
*possible* to provide good output, but the fact that some implementation
fails to do so despite the possibility is not a reason to drop the spec.

Note that for the common complaint of difficult error messages with
"oneOf", we introduced "if"/"then"/"else" keywords in draft-07 (after
extensive debate as to whether they were "too imperative"- in the end the
community demand was extremely high, and the capabilities are no different
than with "oneOf", it's just easier to read and report errors with
"if"/"then"/"else" in many use cases).

thanks,
-henry


On Sat, Jan 20, 2018 at 1:49 PM, Tim Bray <tbray@textuality.com> wrote:

> Could you give pointers to current drafts?  I had a horrible experience
> with JSON Schema (V2 I think? Whatever's current implemented) - the
> implementations were inconsistent with each other, the error messages out
> of the validators were simultaneously verbose and unhelpful, and I was
> looking at it trying to figure how I'd get better-quality messages, it
> seemed sort of intrinsically difficult. I would want to see existence proof
> of a validator that produced high-quality error messages before I could
> really get behind a design.
>
> I ended up writing my own schema language to produce a user-friendly
> validator, but it's on the eccentric side and I doubt of interest to the
> broader community: https://www.tbray.org/ongoing/When/201x/2016/12/
> 01/J2119-Validator
>
> Having said that, I think work on a schema language for JSON might be
> welcomed in the IETF, given a good draft to start with and an editor or
> editors who were interested in doing things the IETF way.  It's not that
> lightweight, we'd have to re-charter the working group, but far from
> impossible.
>
> On Sat, Jan 20, 2018 at 1:25 PM, Henry Andrews <henry@cloudflare.com>
> wrote:
>
>> Hi folks,
>>   I'm one of the JSON Schema draft editors, and it's been brought to our
>> attention that the JSON Schema project may fit within this working group
>> (or a successor?  I'm a little confused as to the current status and scope
>> of this group).  We are definitely interested in having the project adopted
>> by an IETF working group and eventually reaching RFC status if possible.
>>
>>   To date we have not felt like the project is quite ready for that step,
>> although I don't personally have a good feel for the criteria.  Since
>> October 2016, Austin Wright and I, with a great deal of behind-the-scenes
>> help from Ben Hutton and others, have published three drafts of JSON Schema
>> Core and Validation, four of Hyper-Schema, and two of Relative JSON
>> Pointer.  We are actively working on the next Core and Validation drafts
>> right now.
>>
>>   In addition to the obvious JSON Schema community engagement, we are
>> also working directly with the Open API technical steering committee to
>> resolve the problems that led them to adopt an
>> almost-but-not-quite-compatible form of JSON Schema.  I feel like they
>> are a good proxy for general adoption problems as they have a large
>> community of their own, and their concerns arise from common use cases that
>> are not quite well-served at this time (particularly code generation).
>> We've also engaged a bit with folks using JSON-LD who want to figure out
>> how to leverage both, although that idea is very embryonic at this time.
>>
>>   We're currently working on resolving some major questions of scope for
>> the project overall and the Core and Validation specifications in
>> particular (a lot of it related to how use cases such as code generation
>> fit with the existing targeted use cases).  I hope to resolve these in the
>> next major draft before the current ones expire.  There may be a minor
>> bug-fix in the next week or so, separate from that effort, and one
>> additional scope question may be deferred to another draft beyond that.
>>
>>   Once the scope is settled, I had planned to actively look into working
>> group status for the core and validation specifications.  Hyper-Schema
>> requires more work and at least a few viable implementations.  Relative
>> JSON Pointer could probably move to working group status as well if it is
>> of interest (we've also considered merging it into JSON Schema Core if
>> there is no interest in it as its own RFC: JSON Path is not a good fit for
>> our needs despite being a great idea in its own right, and we already make
>> extensive use of JSON Pointer).
>>
>>   I believe that the ongoing broad use and implementation of JSON Schema
>> despite a multi-year abandonment of the draft work shows that it is a very
>> viable and useful technology despite the complaints around the edges (I
>> noticed that the complaint on this mailing list from 2016 was also about
>> code generation- as I mentioned, that's a current focus of ours to
>> resolve).  We've started to see implementations of the new drafts in use,
>> and interest in the latest draft picked up even more quickly than the one
>> before, so there seems to be real interest in taking JSON Schema over the
>> finish line into some sort of official standard. The current team is
>> committed to seeing this through. The recent change in submitting editor is
>> just a reflection of who had the most time; the core team members have all
>> remained involved since draft publication resumed.
>>
>>   I'm interested in any feedback or suggestions on the path forward.
>>
>> thanks,
>> -henry
>>
>> --
>>
>>    -
>>
>>    *Henry Andrews*  |  Systems Engineer
>>    henry@cloudflare.com
>>    <https://www.cloudflare.com/>
>>
>>    1 888 99 FLARE  |  www.cloudflare.com
>>    -
>>
>>
>> _______________________________________________
>> json mailing list
>> json@ietf.org
>> https://www.ietf.org/mailman/listinfo/json
>>
>>
>
>
> --
> - Tim Bray (If you’d like to send me a private message, see
> https://keybase.io/timbray)
>



-- 

   -

   *Henry Andrews*  |  Systems Engineer
   henry@cloudflare.com
   <https://www.cloudflare.com/>

   1 888 99 FLARE  |  www.cloudflare.com
   -