Re: [Cbor] Money amounts

Carsten Bormann <cabo@tzi.org> Mon, 25 February 2019 09:41 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 06FAA12F1AB for <cbor@ietfa.amsl.com>; Mon, 25 Feb 2019 01:41:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, URIBL_BLOCKED=0.001] autolearn=unavailable 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 olkYmtniLxFt for <cbor@ietfa.amsl.com>; Mon, 25 Feb 2019 01:41:30 -0800 (PST)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (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 4A13412894E for <cbor@ietf.org>; Mon, 25 Feb 2019 01:41:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost2.informatik.uni-bremen.de [134.102.200.7]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id x1P9fG0O024177; Mon, 25 Feb 2019 10:41:21 +0100 (CET)
Received: from [192.168.217.106] (p54A6C2FE.dip0.t-ipconnect.de [84.166.194.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 447H575sbBz1Bp8; Mon, 25 Feb 2019 10:41:15 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <20190225102821.583b57b9.changaco@changaco.oy.lc>
Date: Mon, 25 Feb 2019 10:41:14 +0100
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 572780472.921688-f8f542c2426e9ea0d7a45d6edfe4a9ad
Content-Transfer-Encoding: quoted-printable
Message-Id: <A996325B-9D87-4537-87B4-59CD40F56FF2@tzi.org>
References: <20190225102821.583b57b9.changaco@changaco.oy.lc>
To: Changaco <changaco=40changaco.oy.lc@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/C6qgqLQr4xkHbLQ_FFKVhYvzFGM>
Subject: Re: [Cbor] Money amounts
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Feb 2019 09:41:32 -0000

Hi Charly,

What is the difference between a 77112 basket with just one currency in it and a 77111 money?

(I’m not a big fan of having to parse the string version of 77111, but if that string style is important to your application, that’s not relevant.)

You never have the use case of an alternative (like 77112, but “either pay USD 25 or EUR 20 or CAD 30 or AUD 35”)?

Grüße, Carsten


> On Feb 25, 2019, at 10:28, Changaco <changaco=40changaco.oy.lc@dmarc.ietf.org> wrote:
> 
> Hello everyone,
> 
> I've started using tags 77111 and 77112 for money amounts and written a spec for them: https://liberapay.github.io/specs/cbor-money.html
> 
> I hadn't seen the previous proposal <https://j-richter.github.io/CBOR/currency.html> but it's different from mine so I think the two are complementary. That said tags 165 and 77111 do represent the same thing so 77111 could be abandoned if 165 is extended to support more use cases.
> 
> P.S. The form to register new tags is the one in <https://www.iana.org/form/protocol-assignment>, right?
> 
> ---
> Charly C. / @Changaco
> 
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor
>