1

我返回了这个简化的 JSON 对象数组,但问题是 ID(13294 和 13350)被视为一种类型并且无法反序列化。

这是我正在使用的:

JsonConvert.DeserializeObject<List<JsonResultCustom>>(rawjson);

public class JsonResultCustom
{
    public string blurb { get; set; }
    public SplashImage splash_image { get; set; }
    public string title { get; set; }
    public string permalink { get; set; }
}

和 JSON:

{
   "13294": {
    "blurb": "Proin tellus enim, mollis id facilisis",
    "splash_image": {//CUSTOM OBJECT},
    "title": "MPC EXAMPLE with Video",
    "permalink": "https://www.test.com/"
   },
   "13350": {
     "blurb": "Soufflé cotton candy",
     "splash_image": {//CUSTOM OBJECT},
     "title": "MPC SAMPLE: Berry",
     "permalink": "https://www.test.com/blog/"
   }
 }
4

0 回答 0