Newtonsoft.Json deserialize object in Xamarin iOS project

后端 未结 6 1249
感动是毒
感动是毒 2020-11-30 15:03

I\'m getting some very weird behaviour in my Xamarin.Forms Project.

I\'m retrieving some serialized data from a REST API. I\'m then trying to use Json.NET to deseri

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 15:26

    Thanks a lot to all the responses so far! Sadly none of them worked for me.

    After a lot of trial and error I found that I am able to access my data like so:

    var blub = JsonConvert.DeserializeObject(booksString);
    foreach (var element in (JArray)blub)
    {
        var blublub = ((JObject)element).SelectToken("$.Title").ToString();
    }
    

    But it would be an absolute pain if I had to implement my whole API this way... Are there any other ideas from you guys?

提交回复
热议问题