O'Reilly logo

Expert ASP.NET Web API 2 for MVC Developers by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 13

image

Using the Built-in Media Formatters

In this chapter, I focus on the built-in media type formatter classes, which are used to serialize data model objects into JSON and XML. I start by showing you how to control the way that the default media type formatters are used when there is no match between the formats they support and the request Accept header and then show you how to manage the serialized data that the formatters produce.

My emphasis in this chapter is on the JSON format, rather than XML. JSON has become the dominant data format for HTTP web services because it is relatively concise, easy to work with (especially in JavaScript ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required