I am confused. How is âcontrol the newLineâ the same as âwithout LFâ? On Windows, newline is CRLF, the Internet convention is CRLF, elsewhere, even on macOS, it is LF. Are you wanting the old MacOS CR convention? On Tue, 14 Apr 2026 at 6:29â¯AM, stephane ducasse via Pharo-users < pharo-users@lists.pharo.org> wrote:
Hi
My tests are about the documentation of a configuration written in JSON and wanted to have nicely formatted and not a bad one liner. So this is why I want to use the pretty printer but control the newLine: so I did it without the facade
^ String streamContents: [ :s | | writer | writer := STONWriter new. writer on: s. writer jsonMode: true. writer prettyPrint: true; newLine: newline; â¦.
This way I controlled the nature of the newLine:
S
Isnât toJSonString: what you want? Without the pretty which is adding the newlines?
Norbert
Am 10.04.2026 um 12:55 schrieb stephane ducasse via Pharo-users < pharo-users@lists.pharo.org>:
Hi
I would like to know if there is a way to generate JSON without lf?
toJsonStringPretty: is generating lf and this is painful for tests.
S.