Re: json-stream-read should validate json too Amirouche Boubekki 23 Jan 2020 19:16 UTC

Le mar. 21 janv. 2020 à 10:15, Duy Nguyen <xxxxxx@gmail.com> a écrit :
>
> I feel that without validation it's more like a tokenizer than an
> actual parser. Anybody who wants to use it will have to implement
> duplicated validation logic (and could get it wrong if they're not
> careful). Is it possible to adjust the interface to move validation
> back inside json-stream-read (or at least an option to include
> validation)?

The new json-generator-read validates input. Also it is simpler now:

https://github.com/scheme-requests-for-implementation/srfi-180/blob/c916f0069f87ef41c4c54fb6317dd018aba22895/srfi/json.scm#L231-L312