Unpaired surrogate handling Shiro Kawai (26 Jan 2020 00:59 UTC)
Re: Unpaired surrogate handling John Cowan (26 Jan 2020 02:25 UTC)
Re: Unpaired surrogate handling Shiro Kawai (26 Jan 2020 03:16 UTC)
Re: Unpaired surrogate handling Amirouche Boubekki (03 Feb 2020 11:13 UTC)
Re: Unpaired surrogate handling John Cowan (05 Feb 2020 23:49 UTC)
Re: Unpaired surrogate handling Lassi Kortela (07 Feb 2020 15:42 UTC)
Re: Unpaired surrogate handling John Cowan (07 Feb 2020 15:46 UTC)
json-read vs json-fold Lassi Kortela (07 Feb 2020 15:52 UTC)
Re: json-read vs json-fold Amirouche Boubekki (07 Feb 2020 17:27 UTC)
Re: json-read vs json-fold John Cowan (11 Feb 2020 21:43 UTC)
Re: json-read vs json-fold Amirouche Boubekki (11 Feb 2020 21:49 UTC)
Re: json-read vs json-fold John Cowan (11 Feb 2020 22:26 UTC)

Re: json-read vs json-fold Amirouche Boubekki 07 Feb 2020 17:27 UTC

Hello Lassi,

Le ven. 7 févr. 2020 à 16:52, Lassi Kortela <xxxxxx@lassi.io> a écrit :
>
> > What do you think about making the tokenizer, that is now called
> > json-tokens, an optional argument of json-fold?  Since it is easy to
> > implement json-read with json-fold, I would not propagate the optional
> > argument to json-read to keep the signature simpler.  Eventually, it
> > would be easier to somehow handle unpaired surrogates.
>
> A JSON fold makes sense. But if `json-tokens` is a generator, the
> generic `generator-fold` from SRFI 158 should be usable on it;

Yes

> do we need a custom fold just for JSON?

json-fold signature is different from generator-fold:

  (json-fold proc object-start object-end array-start array-end seed events)

where EVENTS is a generator.

--
Amirouche ~ https://hyper.dev