I'm trying to deserialize a JSON array to a string list with:
Newtonsoft.Json.Linq.JArray jsonResponse = JsonConvert.DeserializeObject(result) as Newtonsoft.Json.Linq.JArray;
List<string> response = jsonResponse.ToObject<List<string>>();
The JSON has the following structure:
[["No Es Posible Importar Dos Numeros De Servicios Iguales","No Es Posible Importar Dos Codigos Iguales"]]
But that throws the following error:
Error reading string. Unexpected token: StartArray. Path '[0]'.
How I can deserialize the object without errors?
[[? did you intend to have an array inside an array?var lists = JsonConvert.DeserializeObject<List<List<string>>(result). There's no need for the intermediateJArrayrepresentation by the way.List<List<string>> response = jsonResponse.ToObject<List<List<string>>>()