Can't manage to write JSON to a file

Writing to a string builder first is slower and requires more memory. Unless there is a reason to cache, you should always directly write to the io.

1 Like