Overview of how to use a custom formatter Use a custom formatter to add support for a content type that isn't handled by the built-in formatters. View or download sample code ( how to download) When to use custom formatters For an example of a custom plain text input formatter, see TextPlainInputFormatter on GitHub. This article shows how to add support for additional formats by creating custom formatters.
It provides a built-in output formatter for plain text, but doesn't provide an input formatter for plain text. The framework provides built-in input and output formatters for JSON and XML. Output formatters are used to format responses. Input formatters are used by Model Binding. ASP.NET Core MVC supports data exchange in Web APIs using input and output formatters.