Re: [apps-discuss] Announce: JSON Schema, I-D version 4

Francis Galiegue <fgaliegue@gmail.com> Sun, 03 February 2013 10:36 UTC

Return-Path: <fgaliegue@gmail.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ED72721F8620 for <apps-discuss@ietfa.amsl.com>; Sun, 3 Feb 2013 02:36:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u-bwp7tIvb-G for <apps-discuss@ietfa.amsl.com>; Sun, 3 Feb 2013 02:36:29 -0800 (PST)
Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by ietfa.amsl.com (Postfix) with ESMTP id C712521F85FC for <apps-discuss@ietf.org>; Sun, 3 Feb 2013 02:36:28 -0800 (PST)
Received: by mail-lb0-f175.google.com with SMTP id n3so5772535lbo.20 for <apps-discuss@ietf.org>; Sun, 03 Feb 2013 02:36:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=0QzpbfGf5QtQxyluKl+RHo2jXihufrORTv8wF00tHxI=; b=MN+iuuDtYdGoOET3dw4ZLDgdrKy2KqOkySAidOyG3OmvNHJ/6Kikq27t7HP6uty+Z3 yar1Z+pYSXPBeMBlRvADkNDhKBiIgHoA9WK5XKzmXpG56wdWs8F+64WVGceW4v9qEk3e zEc+1hnFTKSGuopYc/LpNVUSq4tkaCbPHpjskN9xOrfFJPXjU8SNZyQmgGp3EUoRjePt W61LiIBDXPTD+W0Ncon9ScWC5QraSRCrowiuHixtnVPU0wXazttnNwhVrihOF1lhPFwq qr8aH8V5/R+U2r8rD5zVuiAxYzKfZD0Wgc6NAPKS4zPAkAZZ/+mtCipTh6z1ZDvVJ16W YFoQ==
MIME-Version: 1.0
X-Received: by 10.112.25.106 with SMTP id b10mr6780209lbg.68.1359887787750; Sun, 03 Feb 2013 02:36:27 -0800 (PST)
Received: by 10.112.54.134 with HTTP; Sun, 3 Feb 2013 02:36:27 -0800 (PST)
In-Reply-To: <CALcybBCJNtO_5ZyZ8VTbKPqShU7HyY=w8QgNw+cjUSDsqXNf8A@mail.gmail.com>
References: <CALcybBAthjz264t5pr1RYANojbCaA3Getgfk-+M5OAuH-du92g@mail.gmail.com> <70CB0848-00DC-47ED-A9B6-E0353403385F@vpnc.org> <12546069E19E0371DBF0FD27@cyrus.local> <CALcybBCBmw3dsbgYt_pCACH42TrvTpmwYYNFf0nJKiNpR7Rhgw@mail.gmail.com> <CAAQiQRe=beOBrd9m+oBN9ExEmnTt4YJtde2VO2aZ9einjWRsXg@mail.gmail.com> <CALcybBCJNtO_5ZyZ8VTbKPqShU7HyY=w8QgNw+cjUSDsqXNf8A@mail.gmail.com>
Date: Sun, 03 Feb 2013 11:36:27 +0100
Message-ID: <CALcybBA2zCoyi4qZSLqkB_HKpvotG8yA+WM7G8BuzFo2RQPsHw@mail.gmail.com>
From: Francis Galiegue <fgaliegue@gmail.com>
To: Andrew Newton <andy@hxr.us>
Content-Type: text/plain; charset="UTF-8"
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, "apps-discuss@ietf.org" <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] Announce: JSON Schema, I-D version 4
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 03 Feb 2013 10:36:30 -0000

On Sun, Feb 3, 2013 at 12:17 AM, Francis Galiegue <fgaliegue@gmail.com> wrote:
[...]
>
> This means you can easily check the validity of schemas not under your
> direct control, and also detect whether you can actually use such
> schemas (for instance, a schema written for draft v3 will not validate
> against v4 unless it uses keywords which have not changed definitions
> inbetween). And as you can use the same code for both syntax checking
> and instance validation, that leaves less room for errors.
>

And also, it can easily describe other JSON-based formats. For
instance, it took me 10 minutes to write this:

https://github.com/fge/json-schema-validator/blob/master/src/main/resources/json-patch.json

If you receive a patch, you can use JSON Schema to filter out bad
patches before even attempting to patch.

--
Francis Galiegue, fgaliegue@gmail.com
Try out your JSON Schemas: http://json-schema-validator.herokuapp.com