hello masters, i am trying to deserialize [1,2,3] formatted json data. but getting error :
Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[InfoData]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a
JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path '[0].Name', line 3, position 9.
my code is :
private static List<T> _download_serialized_json_data<T>(string url) where T : new()
{
using (var w = new WebClient())
{
var json_data = string.Empty;//assi ...
Go to the complete details ...