emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?)


From: David Lukeš
Subject: Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?)
Date: Sun, 19 Jun 2022 05:31:27 +0200

> 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: sample.json
Description: application/json


reply via email to

[Prev in Thread] Current Thread [Next in Thread]