Click or drag to resize
Json.NET

Deserialize a Collection

 

This sample deserializes JSON into a collection.

Sample
Usage
string json = @"['Starcraft','Halo','Legend of Zelda']";

List<string> videogames = JsonConvert.DeserializeObject<List<string>>(json);

Console.WriteLine(string.Join(", ", videogames.ToArray()));
// Starcraft, Halo, Legend of Zelda