xamarin-docs icon indicating copy to clipboard operation
xamarin-docs copied to clipboard

No overload for method Deserialize takes two arguments

Open BretMishler opened this issue 2 years ago • 1 comments

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.

BretMishler avatar Feb 10 '22 23:02 BretMishler

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);

grimreaper38uk avatar Feb 12 '22 21:02 grimreaper38uk