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

Recognize json as plain text (if no other handlers are present). #261

Merged
merged 2 commits into from
Jan 4, 2025

Conversation

afourney
Copy link
Member

@afourney afourney commented Jan 4, 2025

This PR fixes #34 by adding the application/json mimetype to the PlainTextConverter.

Arguably many other types should be added... and perhaps we should accept anything that looks like UTF-8 or similar.

Note: We may want to render json more directly in the future (#251, #219, etc), but for now, this is a good stopgap that corrects a behavior that was intended, but broken. We can add more sophisticated converters by simply placing them in higher priority when registering them. PlainTextConverter should always be the last resort and a good fallback when no other converters are available.

@afourney afourney requested review from realrajaryan and gagb January 4, 2025 00:35
@afourney afourney merged commit 05b78e7 into main Jan 4, 2025
3 checks passed
@afourney afourney deleted the fix_34 branch January 4, 2025 00:40
@afourney afourney mentioned this pull request Jan 4, 2025
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.

[BUG] JSON not supported?
1 participant