我需要将一个复杂的JSON blob反序列化为标准.净容器使用in code that is not aware of JSON.它希望一切都符合标准.NET类型,特别是Dictionary<string, object>
或List<object>
,其中"对象"可以是基本的或递归的(字典或列表).
我不能使用静电类型来映射结果,并且jobject/jToken不适合.理想情况下,会有某种方式(也许是通过合同?)将原始JSON转换为基本的.NET容器.
I've search all over for any way to coax the JSON.NET deserializer into creating these simple types when it encounters "{}" or "[]" but with little success.
Any help appreciated!