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

Add support for returning pretty JSON response in axum_extra::response::ErasedJson #662

Merged
merged 3 commits into from
Dec 28, 2021

Conversation

guylapid
Copy link
Contributor

@guylapid guylapid commented Dec 27, 2021

Fixes #657

I can also add a new PrettyJson struct as initially discussed in the above issue,
but later seeing the implementation of ErasedJson, I thought it's better to just implement it there and avoid bloating the project with a third struct with an almost identical implementation to axum::Json and exum_extra::response::ErasedJson.

Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

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

Looks good!

Wanna update the changelog as well?

@jplatte jplatte changed the title Added support for returning pretty JSON response in axum_extra::response::ErasedJson Add support for returning pretty JSON response in axum_extra::response::ErasedJson Dec 28, 2021
@jplatte jplatte enabled auto-merge (squash) December 28, 2021 08:16
@jplatte jplatte enabled auto-merge (squash) December 28, 2021 09:12
@jplatte jplatte merged commit d602682 into tokio-rs:main Dec 28, 2021
@guylapid guylapid deleted the json-pretty branch December 28, 2021 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support returning pretty json in response
3 participants