using System.Collections.Generic;
using Newtonsoft.Json.Linq;
public static void Main()
DeckCollection coll = new DeckCollection(){ Version = 1 };
coll.Decks = new Dictionary<string, Deck>();
deck1.ImageUrl = "asodijasodij";
deck2.ImageUrl = "sdasdsd";
coll.Decks.Add("PRIMO", deck1);
coll.Decks.Add("SECON", deck2);
DeckCollectionLIST collList = new DeckCollectionLIST();
collList.Decks = new List<Deck>();
foreach (KeyValuePair<string, Deck> item in coll.Decks)
collList.Decks.Add(item.Value);
string json = JsonConvert.SerializeObject(collList, Formatting.Indented);
public int Id { get; set; }
public string Name { get; set; }
public string ImageUrl { get; set; }
public class DeckCollection
public int Version { get; set; }
public Dictionary<string, Deck> Decks { get; set; }
public class DeckCollectionLIST
public int Version { get; set; }
public List<Deck> Decks { get; set; }