How to make System.Text.Json support serialization/deserialization of Dynamic type

173181002-9c80ef1e-a8c6-4451-b793-f4520b

I recently added the code generator function of System.Text.Json (C#) to support the Quicktype open source project, so I have a better understanding of how the Converter of System.Text.Json is written. Before this, I actually prefer to use Newtonsoft.Json (commonly known as Json.NET ) for JSON serialization/deserialization, because Json.NET has many “convenient” and “rich” functions and The features cannot be found in System.Text.Json , so people who are just getting started with System.Text.Json will definitely feel that their hands are tied, and many of the originally active codes cannot be run. In today’s article, I’m going to share how to make System.Text.Json supportdynamic dynamic typing, so that you can manipulate flexible JSON data in a “weakly typed” way.

continue reading

This article is reprinted from https://blog.miniasp.com/post/2022/06/11/DynamicJsonConverter-for-System-Text-Json
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment