How To Deserialize JSON to Dynamic With Dynamic Declarations in C#

preview_player
Показать описание

In this video, we are going to learn how to deserialize JSON into a dynamic object in C#.
JSON deserialization in C# refers to the process of forming .NET objects from a JSON string. Most of the time, this means creating strongly-typed POCOs. However, there are certain situations when we may prefer flexibility over type inference.

For example, cherry-picking a small portion of JSON data, dealing with external JSON data whose structure is largely unknown or changes very often, etc. Dynamic deserialization comes into play in such cases. This does not necessarily mean the use of the language's inbuilt dynamic keyword. As we mentioned, there are other ways as well.

We have three path-ways to achieve this:
- Use of dynamic declarations
- Using Anonymous Object
- Leveraging the power of JSON DOM

In this video, we will cover the first option, and in the next one, we will talk about the other two.

FOLLOW US ON SOCIAL MEDIA!
Рекомендации по теме
Комментарии
Автор

Thank you all for watching and for your support.

CodeMaze