Re: [Json] JSON or I-JSON?

Pete Cordell <petejson@codalogic.com> Fri, 26 February 2021 14:55 UTC

Return-Path: <petejson@codalogic.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 CB9003A08ED for <json@ietfa.amsl.com>; Fri, 26 Feb 2021 06:55:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 d671YxuY26gG for <json@ietfa.amsl.com>; Fri, 26 Feb 2021 06:55:27 -0800 (PST)
Received: from ppsa-online.com (ppsa-online.com [217.199.162.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8AE7D3A08E4 for <json@ietf.org>; Fri, 26 Feb 2021 06:55:26 -0800 (PST)
Received: (qmail 24250 invoked from network); 26 Feb 2021 14:55:24 +0000
Received: from host31-49-16-155.range31-49.btcentralplus.com (HELO ?192.168.1.72?) (31.49.16.155) by lvps217-199-162-217.vps.webfusion.co.uk with ESMTPSA (AES128-SHA encrypted, authenticated); 26 Feb 2021 14:55:24 +0000
To: John Cowan <cowan@ccil.org>, Anders Rundgren <anders.rundgren.net@gmail.com>
Cc: "json@ietf.org" <json@ietf.org>
References: <90cddfc3-c320-5ac0-210b-c77636383a6b@codalogic.com> <1c819bc9-283d-e36b-7de2-507553420faa@gmail.com> <CAD2gp_TKzBkK=G6PrSKmLyg=67MmFdszCi7X1LVeoO89r63jQA@mail.gmail.com>
From: Pete Cordell <petejson@codalogic.com>
Message-ID: <ce21b4d4-b384-6428-7002-0f029eb6918f@codalogic.com>
Date: Fri, 26 Feb 2021 14:55:23 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0
MIME-Version: 1.0
In-Reply-To: <CAD2gp_TKzBkK=G6PrSKmLyg=67MmFdszCi7X1LVeoO89r63jQA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/BfIZ5tlFeu07XuFnCighktemGLs>
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 14:55:29 -0000

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
---------------------------------------------------------------------