I have (or will have; its not written yet) a .NET web API controller method that I was just going to have return a list of ints as a JSON response. On the client side, I just wanted to deserialize the ints to a List. I tried to use { [1,2,3,4] }, but that's not valid JSON apparently. If I do { "ids" : [1,2,3,4] }, it doesn't deserialize to a simple list. I know I can create a super simple class for this, but I was hoping to avoid that. Is there a solution for this? Thanks!
var ids = JsonConvert.DeserializeObject<List<int>>(jsonResult1);