emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "David Lukeš" <dafydd.lukes@gmail.com>
To: "Bruce D'Arcus" <bdarcus@gmail.com>
Cc: Ihor Radchenko <yantar92@gmail.com>,
	org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?)
Date: Sun, 19 Jun 2022 05:31:27 +0200	[thread overview]
Message-ID: <CAEPTPEypzM7e=N5wPM5Z8HWeS2cB205bvJiXiJUZD8UnN4+FNA@mail.gmail.com> (raw)
In-Reply-To: <CAF-FPGNPJ=fufE_3GJ4yTd04Asa79QaZGX=J-0SLY5Ze1xz-TQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

> 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

[-- Attachment #2: sample.json --]
[-- Type: application/json, Size: 1403 bytes --]

  reply	other threads:[~2022-06-19  3:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-18  6:34 oc-basic: CSL-JSON year as number vs. string (nativecomp?) David Lukeš
2022-06-19  1:44 ` Ihor Radchenko
2022-06-19  1:55   ` Bruce D'Arcus
2022-06-19  3:31     ` David Lukeš [this message]
2022-06-19 13:39       ` Bruce D'Arcus
2022-06-20 12:06         ` Ihor Radchenko
2022-06-20 13:11           ` Bruce D'Arcus
2022-06-20 14:13             ` David Lukeš
2022-06-20 14:24               ` Bruce D'Arcus
2022-06-21  3:28               ` Ihor Radchenko
2022-06-21 12:02                 ` David Lukeš
2022-07-31  4:05                   ` Ihor Radchenko
2022-06-20 12:04       ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEPTPEypzM7e=N5wPM5Z8HWeS2cB205bvJiXiJUZD8UnN4+FNA@mail.gmail.com' \
    --to=dafydd.lukes@gmail.com \
    --cc=bdarcus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).