Unhandled Exception:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: [. Path '', line 1, position 1. occurred
Code:-
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = await client.GetAsync(urlBankDetails + Settings.Username);
var content = await response.Content.ReadAsStringAsync();
var Items = JsonConvert.DeserializeObject<List>(content);
return Items;
public string Name { get; set; }
public string AccountNumber { get; set; }
public double Amount { get; set; }
JSON data recieved (from postman):-
[
{
"Name": "Bank of America",
"AccountNumber": "123456789",
"Amount": 401.5
},
{
"Name": "ICICI",
"AccountNumber": "09876654",
"Amount": 0
},
{
"Name": "SSCB",
"AccountNumber": "114578",
"Amount": 0
}
]
I have tried multiple things but not able to solve this exception.