相关疑难解决方法(0)

将JSON反序列化为C#动态对象?

有没有办法将JSON内容反序列化为C#4动态类型?为了使用DataContractJsonSerializer,跳过创建一堆类会很不错.

.net c# serialization json dynamic

919
推荐指数
22
解决办法
67万
查看次数

Getting nested properties with System.Text.Json

I am working with System.Text.Json in my project as I am processing large files so also decided to use it for processing GraphQL responses.

Due to the nature of GraphQL sometimes I get highly nested responses that are not fixed and don't make sense to map to a class. I usually need to check a few properties on the response.

My issue is with JsonElement. To check nested properties feels very clumsy and I feel like there should be …

c# .net-core system.text.json

10
推荐指数
3
解决办法
4056
查看次数

标签 统计

c# ×2

.net ×1

.net-core ×1

dynamic ×1

json ×1

serialization ×1

system.text.json ×1