79406630

Date: 2025-02-02 13:09:40
Score: 2
Natty:
Report link

The error you have encountered because JsonSerializer.Deserialize is trying to deserialize the JSON string into a single Player object, but your JSON represents a collection of Player objects. You need to deserialize it into a list or collection of Player objects.

Here's how you can adjust your getPlayersAPI method:

Deserialize the JSON into a List

Populate the ObservableCollection with the deserialized list.

Reasons:
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Pankaj Pravin