c# - 将动态属性名称反序列化为c#class

时间:2018-05-26 02:15:19

标签: json.net

Json可以是以下任何一种,我不知道主列表如何转换为c#class

{"title": {"fr-FR": "L'Auberge Espagnole"}}
{"title": {"en-GB": "Van Wilder 2: The Rise of Taj"}} 
{"title": {"fr-CA": "Crooklyn"}} 
{"title": {"es-ES": "Julieta"} }
{"title":{"en":"In Ice Cold Blood"}}
{"title":{"fr":"spiderman"}}
{"title":{"es":"robot"}}

I tried below and it did not work

public class RootObject
{
    public Title title { get; set; }
}

public class Title
{
    public Dictionary<object, string> items { get; set; }
}

0 个答案:

没有答案