Creating Media Type Formatters
Media type formatters are the component responsible for serializing model data so that it can be sent to the client. In this chapter, I explain how media type formatters work by creating a custom data format and using it to explain the different ways in which a formatter can be applied. Table 12-1 summarizes this chapter.
Table 12-1. Chapter Summary
Create a media type formatter.
Derive from the MediaTypeFormatter class and implement the CanReadType, CanWriteType, and WriteToStreamAsync methods.
Register a media type formatter.
Add an instance of the custom class to the formatter ...