[Cbor] cbor.me issue with indefinite form round-trips

"Sipos, Brian J." <Brian.Sipos@jhuapl.edu> Tue, 13 August 2024 18:39 UTC

Return-Path: <Brian.Sipos@jhuapl.edu>
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 9A9CDC1840EC for <cbor@ietfa.amsl.com>; Tue, 13 Aug 2024 11:39:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=jhuapl.edu
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P4wNKJAaYZXE for <cbor@ietfa.amsl.com>; Tue, 13 Aug 2024 11:39:49 -0700 (PDT)
Received: from aplegw01.jhuapl.edu (aplegw01.jhuapl.edu [128.244.251.168]) by ietfa.amsl.com (Postfix) with ESMTP id 57C05C1840E5 for <cbor@ietf.org>; Tue, 13 Aug 2024 11:39:49 -0700 (PDT)
Received: from pps.filterd (aplegw01.jhuapl.edu [127.0.0.1]) by aplegw01.jhuapl.edu (8.18.1.2/8.18.1.2) with ESMTP id 47DGQpRE022365 for <cbor@ietf.org>; Tue, 13 Aug 2024 14:39:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhuapl.edu; h=content-type : date : from : message-id : mime-version : subject : to; s=JHUAPLDec2018; bh=aDyRalLKO3P2OfY0dD9u4ympUFjzsKs4x3x+YXOaoDg=; b=PZsQ3zMuSyz+O2b39LDeGY8AtEA9L568ErcXLHY1AWO5KXI5kjcjhG2qOhsvP5N69z5T gBNJwnUaUyuUimRg+nUImK7j0qn0458j/jrKAviZLFmz81MevJfaErun3UEvtD3bZXDH M8noYKWv82RJuneLGQ5WPCC8gZUwOffvj0DYByuFKoyqEtbF+4kQtvbCiHo7Gtam1OqO UH4vjOzuhnP/ati9lVjNMtGTknAF1wDA2EkM5LSe364VKkAmS1+DJhAXzDUuRNz+9rb8 38vwhv0mlJjG8MIoKOtYq0UufrF9D0orBHtstRKg2lzkpDX5/V+km+4IF7ItiTviMcZU YQ==
Received: from aplex27.dom1.jhuapl.edu (aplex27.dom1.jhuapl.edu [10.114.162.12]) by aplegw01.jhuapl.edu (PPS) with ESMTPS id 40x18bbfpb-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <cbor@ietf.org>; Tue, 13 Aug 2024 14:39:48 -0400
Received: from APLEX21.dom1.jhuapl.edu (10.114.162.6) by APLEX27.dom1.jhuapl.edu (10.114.162.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 13 Aug 2024 14:39:48 -0400
Received: from APLEX21.dom1.jhuapl.edu ([fe80::6032:607c:9f2a:6daa]) by APLEX21.dom1.jhuapl.edu ([fe80::6032:607c:9f2a:6daa%5]) with mapi id 15.02.1544.011; Tue, 13 Aug 2024 14:39:48 -0400
From: "Sipos, Brian J." <Brian.Sipos@jhuapl.edu>
To: "cbor@ietf.org" <cbor@ietf.org>
Thread-Topic: cbor.me issue with indefinite form round-trips
Thread-Index: AdrtlVCxbj6QTuaaTqSIOzDt5iXjUw==
Date: Tue, 13 Aug 2024 18:39:47 +0000
Message-ID: <70de4556b1fa40a28eb01779cf96dd54@jhuapl.edu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.114.162.18]
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_021B_01DAED8E.A4C67760"
MIME-Version: 1.0
X-CrossPremisesHeadersFilteredBySendConnector: APLEX27.dom1.jhuapl.edu
X-OrganizationHeadersPreserved: APLEX27.dom1.jhuapl.edu
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-13_09,2024-08-13_02,2024-05-17_01
Message-ID-Hash: 4XSI7XC3X3MB2GTXGSVJWSUGSOR2NYKN
X-Message-ID-Hash: 4XSI7XC3X3MB2GTXGSVJWSUGSOR2NYKN
X-MailFrom: Brian.Sipos@jhuapl.edu
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] cbor.me issue with indefinite form round-trips
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/57Q2vWWqCnQTIAKQN07WotTKnO8>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>

All,

I can't find any specific issue tracker associated with the https://cbor.me
site, so I'm posting in this list because I know some maintainers also read
this list. Please let me know if there is a specific issue tracker that I
should be submitting to instead.

 

I recently ran into an issue where the decoder does not properly indicate
EDN for indefinite length containers even though the encoder does properly
handle them. This means the tool will not fully round-trip indefinite form
of arrays and maps which makes dealing with some structures more complicated
than it seems like it should be.

 

For example, these inputs will encode properly but then going back to
decoding will remove the indefinite-length indicating underscore:

[_1,2]

{_1:2}

 

I think this tool is great to have and would like to see this little
discrepancy fixed.

 

Brian S.