Skip to content

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

Merged
merged 2 commits into from
Dec 29, 2018
Merged

Update custom-formatters.md #10104

merged 2 commits into from
Dec 29, 2018

Conversation

Rick-Anderson
Copy link
Contributor

@Rick-Anderson Rick-Anderson commented Dec 24, 2018

Fixes #10103

@jfoshee
Copy link
Contributor

jfoshee commented Dec 24, 2018

Thanks, Rick. You have one typo; “Aample” should be “Sample”, I believe.

@Rick-Anderson
Copy link
Contributor Author

@jfoshee Thanks! Fixed.
Thanks for bringing this to our attention.

@Rick-Anderson Rick-Anderson merged commit 566cd32 into master Dec 29, 2018
@delete-merged-branch delete-merged-branch bot deleted the Rick-Anderson-patch-4 branch December 29, 2018 02:22

[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).

Copy link
Member

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)
Copy link
Member

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.

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.

4 participants