小编Sop*_*kHa的帖子

C# - 检查 JSON 结构是否更改

我正在使用 Newstonsoft.JSON 来处理从 Internet 获取的 JSON 文件,但这些文件经常更改结构,我不想每天检查它是否没有更改。如何检查结构是否已更改?我不关心数组中的值或元素数量(但我关心子元素的结构)。我怎样才能实现这个目标?

{
"abc": true, // I want to check if there is "abc", but I don't care if it is true or false
"def": 4, // I want to check if there is "def", but I don't care which value it has
[
    {
    "ghi": false // I want to check if all the children has ghi,but I don't check the value
    }
] // I don't care if there is 1 or 1000 …
Run Code Online (Sandbox Code Playgroud)

c# json json.net

2
推荐指数
1
解决办法
1863
查看次数

标签 统计

c# ×1

json ×1

json.net ×1