如果我有一个来自json.net的序列化JSON,如下所示:
User:{id:1,{Foo{id:1,prop:1}},
FooList{$ref: "1",Foo{id:2,prop:13}}
Run Code Online (Sandbox Code Playgroud)
我想让淘汰输出超过FooList,但我不知道如何继续,因为$ ref的东西可以抛出东西.
我认为解决方案是通过不使用以某种方式强制所有Foos在FooList中呈现:
PreserveReferencesHandling = PreserveReferencesHandling.Objects
Run Code Online (Sandbox Code Playgroud)
但这似乎很浪费..