0
我有一個序列化和反序列化具有接口屬性的JSON類的最簡單方法?
class Product
{
public IComponent[] components;
}
什麼是從一些JSON描述像
{
"components": [
{"type":"ComponentA", "key":value}
{"type":"ComponentB", "key":value}
]
}
反序列化產品對象的最簡單的方法?
謝謝。
可能重複[Newtonsoft JSON集合的接口序列化錯誤](http://stackoverflow.com/questions/12325067/newtonsoft-json-collection-of-interfaces-serialization-error) –