How to deserialize JSON with Json.Net and Xamarin with SubTypes?
问题 I'm trying to deserialize this json: { "teaser": [{ "id": "...", "type": "category", "url": "https:...", },{ "id": "...", "type": "brand", "url": "https:...", "videoCount": 1, },{ "id": "...", "type": "video", "url": "https:...", "headline": "...", }] } It has a list of teasers whereby each teaser is different depending on its type. These would be my objects: public class StartPage { public IList<Teaser> Teaser { get; set; } } public abstract class Teaser { public string Id { get; set; }