David Lukeš <dafydd.lu...@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

Reply via email to