►► Check out our courses: https://bit.ly/cdmz-courses
►► Support us on Patreon and get the source code: / codemaze
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!
►► / marinko-spasojevic
►► / codemazeblog
►► / codemazeblog