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
            });
        }
Exemple #2
0
 public TileDictionary(TileDictionary p) : base(p)
 {
 }