Lesson 11: Formatting JSON and XML Input and Output in MVC Web APIs

Опубликовано: 16 Март 2026
на канале: Paul D. Sheriff
58
4

Lesson 11: Formatting JSON and XML Input and Output in MVC Web APIs

Lesson Description
In this lesson you learn to use the built-in .NET JSON attributes for controlling how the JSON is formatted when serialized in your MVC Web API applications. You also learn global methods to format both JSON and XML being passed in and returned from your Web APIs.

Content
Lesson Objectives 00:00
JSON Formatting Attributes 00:31
DEMO: Using Formatting Attributes 01:11
DEMO: Format JSON Using Global Options in Program.cs 02:27
DEMO: Ignore Read-Only Properties 04:05
DEMO: Return XML From Web API Calls 05:20
DEMO: Consuming XML in a Post() Method 06:42
Custom Formatters 08:10
Lesson Summary 08:31

You can get all the samples and hands-on labs for this course at https://www.pdsa.com/YouTube.

If you are interested in generating MVC Web API applications check out my FREE PDSC Developer Utilities at https://www.pdsa.com/Utilities.

#mvc #webapi #formattingjson #json #xml #jsonattributes #csharp #development #programming #dotnet #dotnetcore #dotnet6 #dotnet7 #dotnet8 #pauldsheriff #pluralsight #youtube

Paul.About()
Hello, my name is Paul D. Sheriff and I have a passion for teaching. I have been training developers for over 35 years through books, videos, article, blog posts, and international conferences and user groups.

Paul.Contact()
Website: https://www.pdsa.com
Email: [email protected]
LinkedIn:   / paulsheriff  
Blog: https://blogs.pdsa.com/
Pluralsight: https://app.pluralsight.com/profile/a...
YouTube Channel: @pauldsheriff