[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?)
From: |
Ihor Radchenko |
Subject: |
Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?) |
Date: |
Mon, 20 Jun 2022 20:04:45 +0800 |
David Lukeš <dafydd.lukes@gmail.com> writes:
>> 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.)
I'd prefer an explicit cond here.
format "%s" may silently work on malformed json files and will mask
issues with bibliography from the user. I personally hate when it
happens and it is often easy to miss issues with downloaded bibliography
entries.
>> Can you provide an example json file demonstrating the problem?
>
> Sure, I'm attaching a short sample.
Thanks! Would you mind creating a patch and possibly supplying a test
that will make sure that the example file and similar are correctly
parsed?
Best,
Ihor
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), (continued)
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), Ihor Radchenko, 2022/06/18
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), Bruce D'Arcus, 2022/06/18
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), David Lukeš, 2022/06/18
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), Bruce D'Arcus, 2022/06/19
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), Ihor Radchenko, 2022/06/20
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), Bruce D'Arcus, 2022/06/20
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), David Lukeš, 2022/06/20
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), Bruce D'Arcus, 2022/06/20
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), Ihor Radchenko, 2022/06/20
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?), David Lukeš, 2022/06/21
- Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?),
Ihor Radchenko <=