Re: port-or-generator argument in reference implementation Amirouche Boubekki 05 Aug 2020 06:34 UTC

Hello Shiro :)

Le mar. 4 août 2020 à 23:39, Shiro Kawai <> a écrit :
> json-fold is supposed to take a port or a char generator, but in the reference
> implementation it passes the argument directly to json-generator, which only
> accepts a port.

json-generator passes its arguments to json-tokens which accepts a
port or generator. Indeed there is a mistake in the specification
json-generator should mention port-or-generator as argument.

> By the way, the srfi text of json-fold says : "The behavior of json-fold is only
> specified when PORT-OR-GENERATOR follows the json-generator protocol."
> What does "json-generator protocol" mean?

The json-generator protocol at