xamarin-docs
xamarin-docs copied to clipboard
No overload for method Deserialize takes two arguments
Under the Retrieve data section, the following line will not compile:
Items = JsonSerializer.Deserialize<List<TodoItem>>(content, serializerOptions);
No overload for method Deserialize takes two arguments
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 155a1af2-3ce7-058b-d243-b4d7a9cd6e22
- Version Independent ID: 47f0df9e-ab6a-a38b-5916-991b5110ebf1
- Content: Consume a RESTful web service - Xamarin
- Content Source: docs/xamarin-forms/data-cloud/web-services/rest.md
- Product: xamarin
- Technology: xamarin-forms
- GitHub Login: @davidbritch
- Microsoft Alias: dabritch
I don't understand this either - it's obviously not going to work - not without a JSON Reader anyway.
The easiest method is to use the example from NewtonSoft;
Items = JsonConvert.DeserializeObject<List<TodoItem>>(content);