Re: [Json] JSON or I-JSON?

Tim Bray <tbray@textuality.com> Fri, 26 February 2021 15:03 UTC

Return-Path: <tbray@textuality.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 E85163A0990 for <json@ietfa.amsl.com>; Fri, 26 Feb 2021 07:03:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=textuality-com.20150623.gappssmtp.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 x_SrEzNFxRrN for <json@ietfa.amsl.com>; Fri, 26 Feb 2021 07:03:28 -0800 (PST)
Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (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 F29E43A098D for <json@ietf.org>; Fri, 26 Feb 2021 07:03:27 -0800 (PST)
Received: by mail-lj1-x235.google.com with SMTP id q23so10930035lji.8 for <json@ietf.org>; Fri, 26 Feb 2021 07:03:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=textuality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qBIPbSHxKHAmJFpd4486aDVMbNDYpL3DyZgfTPCLQrk=; b=ukIidPMwBoKPFLNgYUp+SAvvBFrgp3nobm2cO6Nt2IuCHgX04HzPwabL3liZzHnvsC Fbf4KT9E/dD3lEE0Fp36zMUH3bI677jScWRY8+yA8pw3nLWcG9QYW0T7T/t7yrzNVheJ fhZfSq4B/Gz4A0Ax8+w7maVlmewZc5R9NyAfLeXuPc9UAqooIkxgI18K3TLPSQjuTwVh wpIbaraI1t0MdL3pni2rs3SpIMyHUONjF1Xy9blcNpYBZp4A+YASMsKt3jFu7UaZD0ot 9Gmz7dirxhSJkPr6Nru20bV1R0Zq1rLfQwcOibYnpRQ13DAGi9zfxT976KxxhRo/1cZ6 JQjA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qBIPbSHxKHAmJFpd4486aDVMbNDYpL3DyZgfTPCLQrk=; b=DZQV2rXh/8G8ksUQo79OQw6e0lUwgY20UesWC8O1zJEVrVlsez23I/abqgNo18/Mqp QMUmN5Z9v9XyY+6yYZG8uS0juuR5hHdb1rf8+1QAu10C5q/6X8503qHEOtU9JBlTShJZ 4RAlLklKiXRs7lW/B/vEUG2EQ+AOAdo929DeteEqoc6ax1jSMPLUSp7uLoCS1EPwuul1 LM7ljXUszw9NuauPvfQai3ZxilcMXZtF3lagC0kIpMAb6FvTGbQmtJkkU4wi5ddFhBWc YWWj3mf82F3YeRY0HRtzSy6eRwIkKo6+r7uW0wCvXBXe+to7ld/v+NNGcOU5zALLcvZE QMcA==
X-Gm-Message-State: AOAM533DC3bS+d4aHEJTH1SXB2QgoW7vogNaTqbDBEgYIH6z41Cx60Tc D5nJr2nOwhUkxAeApTRno1hy7Sa9OUGVWjofyLLuXyw/p7Jj/A==
X-Google-Smtp-Source: ABdhPJwjz2vJaQM80ojFoIty7dy+41JIXCNtvvglCEcSVCh+ytQs6RKuAWvIdmzjF4tAYNPmMjbIWMloS2QSMYvOX48=
X-Received: by 2002:a2e:b80c:: with SMTP id u12mr2008841ljo.154.1614351804299; Fri, 26 Feb 2021 07:03:24 -0800 (PST)
MIME-Version: 1.0
References: <90cddfc3-c320-5ac0-210b-c77636383a6b@codalogic.com> <1c819bc9-283d-e36b-7de2-507553420faa@gmail.com> <CAD2gp_TKzBkK=G6PrSKmLyg=67MmFdszCi7X1LVeoO89r63jQA@mail.gmail.com> <ce21b4d4-b384-6428-7002-0f029eb6918f@codalogic.com>
In-Reply-To: <ce21b4d4-b384-6428-7002-0f029eb6918f@codalogic.com>
From: Tim Bray <tbray@textuality.com>
Date: Fri, 26 Feb 2021 07:03:12 -0800
Message-ID: <CAHBU6iv0E2111g99Y4AzX1MWhPAE=SsZxnU9y9zQHUuEAWgVqg@mail.gmail.com>
To: Pete Cordell <petejson@codalogic.com>
Cc: John Cowan <cowan@ccil.org>, Anders Rundgren <anders.rundgren.net@gmail.com>, "json@ietf.org" <json@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d6909105bc3e9176"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/0BLqxrI-0O7Wa47xvXfD3K0vlys>
Subject: Re: [Json] JSON or I-JSON?
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: Fri, 26 Feb 2021 15:03:30 -0000

I personally would use I-JSON if possible because it has useful MUSTs in it
to help resolve arguments between implementors.  [But then, I edited the
RFC, so I would.]  There's one downside, which is that as far as I know,
there's little software that actually enforces the I-JSON constraints.

On Fri, Feb 26, 2021 at 6:55 AM Pete Cordell <petejson@codalogic.com> wrote:

> On 26/02/2021 13:59, John Cowan wrote:
> >
> >
> > On Fri, Feb 26, 2021 at 7:49 AM Anders Rundgren
> > <anders.rundgren.net@gmail.com <mailto:anders.rundgren.net@gmail.com>>
> > wrote:
> >
> >     If the standard-to-be is supposed to interoperate with browsers and
> >     node.js the only viable option is RFC7493.
> >
> >     If the standard-to-be also targets the financial market, further
> >     constraints apply since floating point arithmetic is ill-suited for
> >     monetary operations. E.g. a monetary amount of 46.99 should be
> >     represented in JSON as the string "46.99".
> >
> >
> > RFC 8259 incorporates all of the restrictions of 7493 as
> > interoperability warnings, including the one above.  That way it stays
> > compatible with ECMA-404 (which has no such restrictions or warnings)
> > but still steers you away from the dark corners of JSON.
>
> RFC 8259 tells you "that way lies madness" but doesn't actually tell you
> to not to go that way!  RFC 7493 makes it explicit not to go that way
> for those that might otherwise say "well you didn't tell me not to...".
>
> Pete.
> --
> ---------------------------------------------------------------------
> Pete Cordell
> Codalogic Ltd
> C++ tools for C++ programmers, http://codalogic.com
> Read & write XML in C++, http://www.xml2cpp.com
> ---------------------------------------------------------------------
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>