Skip to content

Conversation

@tyilo
Copy link
Contributor

@tyilo tyilo commented Oct 10, 2025

Motivation

Normally human-readable JSON HTTP response bodies have a trailing newline, so that the body is a valid "text file" and nicer for viewing in the terminal with something like curl.

I think it would make sense that ErasedJson::pretty also had a trailing newline.

Solution

Append a newline to the output of serde_json::to_writer_pretty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant