我得到我的Xamarin.Forms项目一些非常怪异的行为。
我从REST API获取一些序列化的数据。 然后我试图使用Json.NET反序列化的对象。
这工作完全正常在Android上,如果我的代码复制到.NET控制台应用程序也适用。 然而,在我的iOS项目,调用.DeserializeObject()刚刚返回null。 它不会引发错误或以任何方式抱怨。
我发现这个讨论: https://forums.xamarin.com/discussion/15152/deserialization-not-working-with-json-net-on-ios-device-ios-simulator-works ,但我并没有链接摆在首位,并试图通过设置建议TJPurtell.1752属性的所有组件没有帮助。
谁能告诉我在这里做什么?
非常感谢!
一月
编辑
下面是我想要反序列化样本响应:
[
{
"Isbn":{
"Isbn10":"0099910101",
"Isbn13":"9780099910107"
},
"Title":"A Farewell to Arms",
"Authors":[
"Ernest Hemingway"
],
"Publisher":"Random House",
"ReleaseDate":"1994",
"PageCount":293,
"Description":"In 1918 Ernest Hemingway went to war, to the 'war to end all wars'. He volunteered for ambulance service in Italy, was wounded and twice decorated. Out of his experiences came A Farewell to Arms. Hemingway's description of war is unforgettable. He recreates the fear, the comradeship, the courage of his young American volunteer and the men and women he meets in Italy with total conviction. But A Farewell to Arms is not only a novel of war. In it Hemingway has also created a love story of immense drama and uncompromising passion.",
"ThumbnailUrl":"http://books.google.com/books/content?id=m68LhBiNv8YC&printsec=frontcover&img=1&zoom=1&source=gbs_api"
},
{
"Isbn":{
"Isbn10":"9044538780",
"Isbn13":"9789044538786"
},
"Title":"Het huis van de namen",
"Authors":[
"Colm Tóibín"
],
"Publisher":"Singel Uitgeverijen",
"ReleaseDate":"2017-08-24",
"PageCount":0,
"Description":"Klytaimnestra heeft veel moeten doorstaan. Haar man heeft haar kind, haar mooie oudste dochter, geofferd aan de goden, en zij heeft hem niet kunnen tegenhouden. Hoe kan ze dit ooit te boven komen? En hoe zullen haar andere twee kinderen reageren op deze ontwrichtende gebeurtenis? Eén ding neemt ze zich voor: haar man zal dit met de dood moeten bekopen.",
"ThumbnailUrl":"http://books.google.com/books/content?id=yl8yDwAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api"
}
]