Discover how to use XML formatted data in place of JSON.
- [Instructor] There are times when JSON…isn't the format that you need to read and write…from your API.…Occasionally, you'll be dealing with a legacy client…that can only deal with XML.…Web API allows you to serialize and deserialize data…to and from many different formats,…but enables XML and JSON by default.…For XML serialization, Web API comes…with two different built-in libraries,…XMLSerializer and DataContractSerializer.…It's important to understand the basic differences…between these two options, so that you know…which one to use in which situation.…
XMLSerializer is the older way, but does have…the advantage of being opt-out, meaning…that every public property or field…gets serialized by default, unless you tell it not to…with the XmlIgnore attribute.…DataContractSerializer is newer, and generally…about 10% faster than the XMLSerializer.…However, it's opt-in, requiring that you mark every field…or property you want serialized with…the DataMember attribute.…For our project, we want to do…as little configuration as possible.…
AuthorJonathan "J." Tower
- Convention-based routing
- Binding your code to an HTTP request
- Validating models
- Using attributes to route requests
- Customizing attribute routes
- Data serialization and model binding
- Error handling
- Using exception filters and exception loggers
- API documentation and testing
- Securing your API
Skill Level Beginner
ASP.NET MVC: HTTP Request Life Cyclewith Janan Siam2h 15m Advanced
1. Controllers and Actions
3. Data Serialization and Model Binding
4. Error Handling
5. API Documentation and Testing
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.