-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Update custom-formatters.md #10104
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
Update custom-formatters.md #10104
Conversation
Thanks, Rick. You have one typo; “Aample” should be “Sample”, I believe. |
@jfoshee Thanks! Fixed. |
|
||
[View or download sample code](https://github.com/aspnet/Docs/tree/master/aspnetcore/web-api/advanced/custom-formatters/sample) ([how to download](xref:index#how-to-download-a-sample)) | ||
|
||
## When to use custom formatters | ||
|
||
Use a custom formatter when you want the [content negotiation](xref:web-api/advanced/formatting#content-negotiation) process to support a content type that isn't supported by the built-in formatters (JSON, XML, and plain text). | ||
Use a custom formatter when you want the [content negotiation](xref:web-api/advanced/formatting#content-negotiation) process to support a content type that isn't supported by the built-in formatters (JSON and XML). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super-sure about these edits. We support text/plain
with strings for output.
We don't currently do anything with text/plain
for input.
@@ -97,7 +97,8 @@ Formatters are evaluated in the order you insert them. The first one takes prece | |||
|
|||
## Next steps | |||
|
|||
See the [sample application](https://github.com/aspnet/Docs/tree/master/aspnetcore/web-api/advanced/custom-formatters/sample), which implements simple vCard input and output formatters. The application reads and writes vCards that look like the following example: | |||
* [Plain text formatter sample code on GitHub.](https://github.com/aspnet/Entropy/tree/master/samples/Mvc.Formatters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think more explanation is needed here about what the sample does.
Fixes #10103