From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iF3VEtSYrmKvAgAAbAwnHQ (envelope-from ) for ; Sun, 19 Jun 2022 05:32:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ANTEEdSYrmLKMQAAG6o9tA (envelope-from ) for ; Sun, 19 Jun 2022 05:32:36 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E52CBA6A8 for ; Sun, 19 Jun 2022 05:32:35 +0200 (CEST) Received: from localhost ([::1]:40370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2lfv-00056H-38 for larch@yhetil.org; Sat, 18 Jun 2022 23:32:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2lf4-000567-D5 for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 23:31:42 -0400 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]:39627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2lf2-00080I-K6 for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 23:31:42 -0400 Received: by mail-io1-xd33.google.com with SMTP id i16so8110888ioa.6 for ; Sat, 18 Jun 2022 20:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3INn6h0p8JFnXwQIhYFK8s4Dzeh/eplIGfwR1/8zYvs=; b=jkMThYsmrapX1SORvhQW1uaievUBhdk0QoT65yiMPfZAXZgHKtAPKmLcxRZ0qO1s2S tHxpYWnIoVna9+yi0Frp3V/YFlc450H/1mMsRX4Rm+Sjq5NwmZkWTrJgg5UtNokfY503 OreXZ4yTNkQY5JjfCSoS6snFqwUgLewDqUROJ5esBwVJnZ01GMQwRN0NjAMtBCr56d3h 2YUwMC0jNugl442fZy2SKRa5HkNk9mxhlT4n55IyhgdUcNHUmaawRsLkladef44r7Mg/ 3BadM7MEIA3bSys6G/x6NpLzodifgQselrHWS3tzc03XKszJqYdYIxseSPVsODHjil8/ fOJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3INn6h0p8JFnXwQIhYFK8s4Dzeh/eplIGfwR1/8zYvs=; b=BOuBAaS41NP9k69W+w72iyfdJ5rBEAu4d/n2zp2px12AgCInQy9avB6Q67l2M1nnZQ 7Pzre3S63dZODC22LO4quIEihUnFvmZjL/PfWtwMNkDf7MS9mE7WyyASzaQrW0LqOD4R pup540764AgSQ4vwpNKhoGctiC1cUOtxMeALHcE/xvYpyjvG2waqPmltPlWgGytRJLPc oOANnTLf7kefGshwGl3B+7XP/5MXGTSy+gSlmtrmaDhYKnj5VAUC/mCykJK1vvydaNQ/ e1QWJl91AyktpEr0+OeA7qkM5jczGFdX/XYCEkRf3s41L8qHewbljkUcsDB4SEzQh5Pu 959A== X-Gm-Message-State: AJIora89VtheTfCRX6jD5+/9B6v1edRZAp5eW9iZbd2swVId/LGnOnmA U4EaemkLrUkwmE1aoc50dbbHMuD1awyOc5TwGks= X-Google-Smtp-Source: AGRyM1ufc3s52gZlYWRKiWZ7QGrTWi8jCwPgTR+KWoYrA/KR/LTj7vtWmbxw54+t5QBpGKs4IwfrlmT0KSxpj3HCHbY= X-Received: by 2002:a05:6638:2401:b0:333:f1fe:79ef with SMTP id z1-20020a056638240100b00333f1fe79efmr9294320jat.87.1655609499170; Sat, 18 Jun 2022 20:31:39 -0700 (PDT) MIME-Version: 1.0 References: <87h74h4ecd.fsf@localhost> In-Reply-To: From: =?UTF-8?B?RGF2aWQgTHVrZcWh?= Date: Sun, 19 Jun 2022 05:31:27 +0200 Message-ID: Subject: Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?) To: "Bruce D'Arcus" Cc: Ihor Radchenko , org-mode-email Content-Type: multipart/mixed; boundary="00000000000015d0a505e1c4a049" Received-SPF: pass client-ip=2607:f8b0:4864:20::d33; envelope-from=dafydd.lukes@gmail.com; helo=mail-io1-xd33.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655609556; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3INn6h0p8JFnXwQIhYFK8s4Dzeh/eplIGfwR1/8zYvs=; b=cTo7UiRj0yqG4WN46ErtovO5xCBGMAZgBhct2rYnBPpub/f05DA4UD9UhIQsVB6YZjYFYN 1bFjlBxyXjsKXJUlOtcgkSvO6eylMfvVFsv5EQ9lYhAD5sU+bZLg1DNfgxZZkzyV+pJZ8W hF6qqGpKtQJi/vGZ9ZH/0zqyM48qUOjD5xk5NqyodSLAcwqkkcvFqHdgstrfp0Q7aLhhvs 1384LXpcMY2el0vhbyYJc9QCYLAlFBDddg6hAz6+6RifNz7GdaBLet6SntAVrZPBdxhHNG RnMe83Eat8pcwu4JA/dby8+c4cuQZ7RE6HzzNeO0FbfucMVCVqB6GQwSDVTorg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655609556; a=rsa-sha256; cv=none; b=kphxtjmBcvQs3WgVIgdvTAhgSHbtBdR6gyiyMSwedapE5vpVxkbJH4anztXGwYowxxyLPH T44vL59/jhcuzqUZ+lhkFLlh+4bObA+HMecLcbSl4sOMdMjdpPwSa02JdN7nGx9mlk3UYe N5LoPeOoIH21NoQy6pKhQr8APoroi5XE9De6VMdEI6qve8mdmcFV8W7zvjBDSZqLtM+j80 BAfOZo9djOC9QFsnwvcZX25ifUlrLVlRGdrFahGL0HlsJ6kl9/FscKpsG7brw325sDJCjb NapjGw1BPAdeNN5x8VsIaojAKvRSrG8PsjajoC/AHA26mpvjUurO4SsTxGmicg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jkMThYsm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jkMThYsm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E52CBA6A8 X-Spam-Score: -2.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: aWA6oYWveFte --00000000000015d0a505e1c4a049 Content-Type: text/plain; charset="UTF-8" > I suspect that multiple json formats may be available in the wild. Some > parsed as a list of strings and some parsed as a list of numbers. > The JSON schema allows either: Ah, thanks for looking this up! So (format "%s" (caar date)) instead of (number-to-string (caar date))? (That was actually my initial solution, purely out of being defensive and trying to make sure it doesn't break in yet a different way should other things than numbers turn up in date-parts, even nil or such. Then I thought it was too hamfisted and didn't have the time to make a case for being so defensive here. But since it's needed even just to be *compliant*, the case seems quite clear now.) > Can you provide an example json file demonstrating the problem? Sure, I'm attaching a short sample. Best, David --00000000000015d0a505e1c4a049 Content-Type: application/json; name="sample.json" Content-Disposition: attachment; filename="sample.json" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l4kr4cld0 WwogIHsiaWQiOiJSYW1zY2FyXzIwMTlfc291cmNlX2NvZGVzX2luX2h1bWFuX2NvbSIsImFic3Ry YWN0IjoiQWx0aG91Z2ggaW5mb3JtYXRpb24gdGhlb3JldGljIGNoYXJhY3Rlcml6YXRpb25zIG9m IGh1bWFuIGNvbW11bmljYXRpb24gaGF2ZSBiZWNvbWUgaW5jcmVhc2luZ2x5IHBvcHVsYXIgaW4g bGluZ3Vpc3RpY3MsIHRvIGRhdGUgdGhleSBoYXZlIGxhcmdlbHkgaW52b2x2ZWQgZ3JhZnRpbmcg cHJvYmFiaWxpc3RpYyBjb25zdHJ1Y3RzIG9udG8gb2xkZXIgaWRlYXMgYWJvdXQgZ3JhbW1hci4g U2ltaWxhcml0aWVzIGJldHdlZW4gaHVtYW4gYW5kIGRpZ2l0YWwgY29tbXVuaWNhdGlv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