14 JSON serialization/ deserialization and custom model binding

This chapter covers

  • Serializing and deserializing JSON data
  • Using the [FromBody] argument attribute to magically deserialize JSON data
  • Implementing a custom model binder using the IModelBinder interface
  • Generating an OpenAPI specification on the fly at run time

This is it. The last refactoring chapter. Throughout this book, you refactored an existing codebase from the ground up. We learned about test-driven development, how to write clean code, and tips and tricks for C#. Figure 14.1 shows how far we’ve come on our journey together.

Figure 14.1 In the previous chapters, we implemented ...

Get Code like a Pro in C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.