Re: [Json] JSON Schema Language, Draft 01

Anders Rundgren <anders.rundgren.net@gmail.com> Mon, 01 July 2019 08:20 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 CA950120026 for <json@ietfa.amsl.com>; Mon, 1 Jul 2019 01:20:29 -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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham 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 1FuuOgQMuWtZ for <json@ietfa.amsl.com>; Mon, 1 Jul 2019 01:20:27 -0700 (PDT)
Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (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 492D712004E for <json@ietf.org>; Mon, 1 Jul 2019 01:20:27 -0700 (PDT)
Received: by mail-wr1-x430.google.com with SMTP id e3so3169304wrs.11 for <json@ietf.org>; Mon, 01 Jul 2019 01:20:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=RNGjjtKA1VGE2a5uVdl8jvUz2AbFXq1tY0Qg0t9Kd7I=; b=fJMvdT7HbvE5ZggCZR2lEm+CsyeGv1HmbRCK8NP7UzrB8ZwOXh2WJV1/yCbHtoRWkk IAEQPW0HGMUBkDLx7X9xXnjIUxjK5Eu87gh8Rp0sw6egj7jhZ9h2C9bLLZG/vCGdx4Ni +6lpG5tdbusIafWRXXZ9HQAU1cQgO5fWMxS9ajIFIaWm4CpI4X84gjMEAcJOwkG9uvPm GXopeO53Icygy4NgsPBBGxLdZBHMpgd40UNTBgVdbUHQlSjoF7bhOn5DysGQc/p43v8n /I/OaekB6Ib83OkY6vns5tXto1XI382aVjQjPlxuh2zOWAEl98F5PFdaZ4luXa8nzRV1 kjVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RNGjjtKA1VGE2a5uVdl8jvUz2AbFXq1tY0Qg0t9Kd7I=; b=Iqeb18kF7MwstwvQBG2dCtURcwY4AnbhOf95qUGCsuEIrJo4lWzdt8Bt/x0z2FdXW+ SroZIv235qgJL0c+yptOTejwY0vhZixYQeD8GhnSb6lC1MtBHjDg7pWNyoI0rjvHz6VK vms5NjXvPY91s1OcNQVFhh65qMkxFn6WBL0LOhE3UpoS+EztIvf+S+xob+mwImQ15kQz +Y+ZKIWHw0kfUgBuP1cDK4l0goWwJdm3zgEjJFYw7iW0lEIWxD7fTorGi9Bh20wWC9rV q14luXDEfE7PgRg5Cgr/1GnbHIgaOmRQQcx1k8Ur5y0simFQJnkkq0N07xJ2ZAdvwuum p6LQ==
X-Gm-Message-State: APjAAAU2awo1hAiP5eo3CO2urqli4p7kU2DJkzHvX0KmxJZXI+NB78Ci nigBgMY5B4UkTXh9bKAxBsJBY74UjPo=
X-Google-Smtp-Source: APXvYqyv5z6LekFHVHLi0tx9ZkD67mMXdA8rUuS44sx13cAzXSA6Vvg1IlJbzZvAwDk7osTWHjccnw==
X-Received: by 2002:adf:f483:: with SMTP id l3mr19194040wro.256.1561969225415; Mon, 01 Jul 2019 01:20:25 -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 v4sm10745230wmg.22.2019.07.01.01.20.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 01:20:24 -0700 (PDT)
To: Ulysse Carion <ulysse@segment.com>, JSON WG <json@ietf.org>
References: <CAJK=1Rh6gQE5-4aOu7ZM9Fc-q_hW79U_Q7wkmWwVRS0=GPAnxA@mail.gmail.com> <CAJK=1Ri=SeJFrkk7QeSmg2wQWqJF_5kbZ99CW6UVZHSZ7=bprQ@mail.gmail.com> <CAJK=1RihXUfxw=waX82O87VHzEfFq+_XFEqjve0y+Bqu=rbGCQ@mail.gmail.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <7d7d39ef-c1cb-3648-b6df-222902d3391a@gmail.com>
Date: Mon, 01 Jul 2019 10:20:23 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <CAJK=1RihXUfxw=waX82O87VHzEfFq+_XFEqjve0y+Bqu=rbGCQ@mail.gmail.com>
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/__9m8WQpZW8V5t7Yt-uo65_G3G4>
Subject: Re: [Json] JSON Schema Language, Draft 01
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, 01 Jul 2019 08:20:30 -0000

Hi Ulysse,
Since you are asking for feedback...

https://tools.ietf.org/html/draft-json-schema-language-01#section-3.3.3
"Type"
The lack of support for common numeric types such as byte, int64, double etc. IMHO makes JCL fairly limited and unsuitable for code generation for languages like Java and C#.

thanx,
Anders


On 2019-06-29 21:00, Ulysse Carion wrote:
> Hi all,
> 
> I wanted to provide an update on working tooling I've built on top of the latest draft of JSON Schema Language. I believe the ease with which such tooling can be written can be seen as an important reason why a minimal schema language for JSON is useful.
> 
> I've made a code generator (jsl-codegen), a schema inference tool (jsl-infer), and a test data generator / fuzzer (jsl-fuzz). They're all open-source and available here:
> 
> * https://github.com/json-schema-language/jsl-codegen
> * https://github.com/json-schema-language/jsl-infer
> * https://github.com/json-schema-language/jsl-fuzz
> 
> The jsl-codegen tool supports Java, Golang, and TypeScript. It's similar to protoc in the gRPC world, or the OpenAPI code generator tools.
> 
> The final tool, jsl-fuzz, is similar to the "json-generate" feature in the CDDL tool in:
> 
> https://www.rfc-editor.org/rfc/rfc8610.html#appendix-F
> 
> jsl-infer can be seen as the inverse of jsl-fuzz.
> 
> The small size of the JSL spec means that making tooling like this is rather trivial. jsl-infer and jsl-fuzz are 350 and 150 LOC, respectively.
> 
> I'm curious if folks have thoughts / criticisms on this tooling?
> 
> Regards,
> Ulysse
> 
> On Thu, Jun 6, 2019 at 8:04 PM Ulysse Carion <ulysse@segment.com <mailto:ulysse@segment.com>> wrote:
> 
>     Oh wait, another big change -- I got rid of the URI-based reference stuff. Thanks to Tim Bray for pointing out it's kind of needlessly complex.
> 
>     On Thu, Jun 6, 2019 at 5:18 PM Ulysse Carion <ulysse@segment.com <mailto:ulysse@segment.com>> wrote:
> 
>         Hi folks,
> 
>         Working off discussion in this mailing list, I've published a draft -01 of JSON Schema Language:
> 
>         https://tools.ietf.org/html/draft-json-schema-language-01
> 
>         Notable changes are the addition of "timestamp" (RFC3339) as a type, as well as the addition of enums. The syntax of JSL is now defined mostly through CDDL, and an informative appendix maps some JSL schemas to CDDL ones. The rest of the changes mostly serve to make the spec easier to read and implement, nothing dramatic.
> 
>         Would love feedback! What more should be removed or added to move this forward?
> 
>         Best,
>         Ulysse
> 
> 
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>