Re: JSON Lines support Amirouche Boubekki 21 Jan 2020 14:59 UTC
Le mar. 21 janv. 2020 à 13:05, Lassi Kortela <firstname.lastname@example.org> a écrit : > > Big thanks to Amirouche for taking up this important job! Thanks! > You mentioned JSON Lines (<http://jsonlines.org>). This is a great file > format for structured logging (where each log entry is written as an > easy-to-parse record instead of a free-form line of text). > > I'd love having a procedure in the SRFI to explicitly write a JSON Line > (i.e. one JSON value containing no literal newlines) to a port. > Something like: > > (json-write-line obj [port]) > > Or if a procedure is added that takes custom rules for the output (e.g. > how many spaces to indent), JSON Lines be a preset for those rules. The code seems easy with the current implementation, but it might be better to provide a helper for that.