You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm having trouble figuring out how to emit a newline at the end of a file write using serde_json. These JSON files I'm serializing get added to a git repo, and diff complains about the lack of newlines at the end. Not to mention, cat-ing these files out messes with the display.
I'd love for there to be a flag on the *Formatter traits to allow this, but there doesn't seem to be one. Is there an easy fix that I'm overlooking? Thanks!
The text was updated successfully, but these errors were encountered:
I think that ending the output with a newline should be the default behavior for pretty formatting. I don't think there are many situations where one would want pretty formatting but without a trailing newline
Hello, I'm having trouble figuring out how to emit a newline at the end of a file write using
serde_json
. These JSON files I'm serializing get added to a git repo, and diff complains about the lack of newlines at the end. Not to mention,cat
-ing these files out messes with the display.I'd love for there to be a flag on the
*Formatter
traits to allow this, but there doesn't seem to be one. Is there an easy fix that I'm overlooking? Thanks!The text was updated successfully, but these errors were encountered: