Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #36177 -- Added a trailing newline to JSON serializer. #19232

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

knyghty
Copy link
Member

@knyghty knyghty commented Mar 6, 2025

Trac ticket number

ticket-36177

Branch description

Adds a trailing newline at the end of JSON serialization regardless of the indent option.

I'm not 100% sure about this implementation. There are maybe cases where you really want to save that extra byte over the network, in the occasional case where it matters. So I wondered if maybe I should add this to dumpdata, which would also fix this issue for other serializers, but it felt a bit like the wrong place to do it. But it may be the right place 🤷🏻

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.

Sorry, something went wrong.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you - this looks good to me 👍

@sarahboyce sarahboyce merged commit 8df5ce8 into django:main Mar 11, 2025
32 checks passed
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.

None yet

2 participants