Re: [Json] JSON Schema Language

Anders Rundgren <anders.rundgren.net@gmail.com> Sat, 04 May 2019 11:44 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 B8D341200B1 for <json@ietfa.amsl.com>; Sat, 4 May 2019 04:44:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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_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 2teBz_vAq-VJ for <json@ietfa.amsl.com>; Sat, 4 May 2019 04:44:12 -0700 (PDT)
Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 B766C120044 for <json@ietf.org>; Sat, 4 May 2019 04:44:11 -0700 (PDT)
Received: by mail-wr1-x42c.google.com with SMTP id h15so5368484wrb.2 for <json@ietf.org>; Sat, 04 May 2019 04:44:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wXO+ZtLDJP8xdrpsJHnUH3dG4Toa6h/bXte5vNhHYK0=; b=u/CCux+RemH6DYd+x6ACuIMiv4gKw4lnmhbI5arZMfOhi6zZNwJkG88d9BvIaMshbv D/J7VIlRZ4KR4uPZdVNp6vE+e9aekbJ5KNc5JL9hSiGHlF5XcczAUiTq1TNzC+N1HUfr mrnKD3rUFK9h52TWDXbGR6itEG9GZxHgApHhq2e8n5RuhUQvJ0RlDIVvvb9Uvtvc5v7q QsPAb/A6mJa3yqAqbTzhh2VJRxb+I1fFYDR9qkFVcOqDEmQKBLngrPxTrKZBL2RI4AAz oqo86/qsoEqaaNzVhkOaJLf+wTCTPBR0HJLB3eBdOdPBux2RxCl0EcWgIsVss3j+UXD5 BYtw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wXO+ZtLDJP8xdrpsJHnUH3dG4Toa6h/bXte5vNhHYK0=; b=OxZZukohwOU5XnZLfXcO6jd4rCrzrDQbZPxScNGj8gsdh0lRMAEDqCC7Qs/LCtnynA r0cm49oCW8LIAWQQeZOhp4+BIyuoHjR3ejmNfNNCQysVn0cohz7NIlqAPATGA2EjEF3H ZPlMiMc7iL/G0H39jS09R96+NF6jl93228BSMJvtsLivSknGAmN+F+3xOONJGg9952fV dQIsp3rw6pC0Q/bin6SRJRIQVg4QgBdZ1KL9mt5ikQ27HhmMSFAeOV04s7tWgxUaJURg 22AfUwLboD3IHHAK3nZz7ZO9jswdWDatU7tk96/betzBN6tnvvsmGBuTovbFKt+hZCBr nwvQ==
X-Gm-Message-State: APjAAAVM6UKvD1kupMBrFeXlWpRNfO3vKYHtNDVHb0oKB/27oAYsRzo0 EDRN2ZTSTXgIxLQknoMr6O1tM8LqxIg=
X-Google-Smtp-Source: APXvYqwnpDuRBodPKBfjkf2QrDzh30OVDrV6yZq0oMd6O8Zp3KVACec/Vky7/H+rBiHX+ihhzx6PUQ==
X-Received: by 2002:adf:83a7:: with SMTP id 36mr10496845wre.310.1556970250166; Sat, 04 May 2019 04:44:10 -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 a20sm9168966wrf.37.2019.05.04.04.44.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2019 04:44:09 -0700 (PDT)
To: Carsten Bormann <cabo@tzi.org>, Austin Wright <aaa@bzfx.net>
Cc: json@ietf.org, Ulysse Carion <ulysse@segment.com>
References: <CAJK=1RjV1uv0eOdtFZ8cKn-FfCwCiGP5r2hOz1UamiM6YV4H1A@mail.gmail.com> <39682ec8-f993-a44c-d3e2-1638d2c1608f@gmail.com> <29CAE1CE-D6CB-4796-B2F2-2095BE921385@tzi.org> <AD5ABD9C-F5F2-477D-B862-529C890D5472@bzfx.net> <DA1767B8-22D6-4EA9-8112-4B36B79E9039@tzi.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <a6fc41f0-bc11-13f1-21b8-0d5d4ead574c@gmail.com>
Date: Sat, 04 May 2019 13:44:06 +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: <DA1767B8-22D6-4EA9-8112-4B36B79E9039@tzi.org>
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/8cfdd35HqS9TwGZ4U9XVd6TA8Vw>
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: Sat, 04 May 2019 11:44:14 -0000

Test run with a popular JSON Parser nowadays adopted by Microsoft as well:

Newtonsoft.Json.JsonReaderException: 'Input string '7800000.0' is not a valid integer. Path 'counter', line 1, position 39.'

However, in addition to supporting common data types, there should (IMO) also be a way to specify JSON serialization format.

One camp headed by the Open API folks maintain that incompatibility with JavaScript is of uttermost importance and therefore mandate that "long" integers should be serialized as JSON Numbers.

Another, and (if may say it) slightly more practical bunch of people, rather put "long" integers within quotes and thus maintain interoperability with essentially every platform.  To make things yet a bit more fuzzy there exists at least 4 different takes on the latter: Decimal, Hexadecimal, Base64, and Base64Url.

thanx,
Anders