public override object ReadJson(
            JsonReader reader,
            Type objectType,
            object existingValue,
            JsonSerializer serializer
            )
        {
            JObject item = JObject.Load(reader);

            string id = "";

            if (item["users"] != null)
            {
                id = item["users"].Value <string>();
            }

            TileDictionary?tiles = new TileDictionary();

            if (item["tiles"] != null)
            {
                tiles = item["tiles"].Value <TileDictionary>();
            }

            return(new Board {
                Id = id, Tiles = tiles
            });
        }
Esempio n. 2
0
 public TileDictionary(TileDictionary p) : base(p)
 {
 }