private static JSONClass SerializeClothingMutation(ClothingMutation clothingMutation) { var newJson = new JSONClass(); newJson.Add("DAZClothingItemName", new JSONData(clothingMutation.Id)); newJson.Add("Active", new JSONData(clothingMutation.Active.ToString())); return(newJson); }
private static ClothingMutation DeserializeIntoClothingMutation(JSONClass inputObject) { var keys = inputObject.Keys.ToList(); var clothingMutation = new ClothingMutation() { Id = inputObject.Childs.ElementAt(keys.IndexOf("DAZClothingItemName")).Value, Active = bool.Parse(inputObject.Childs.ElementAt(keys.IndexOf("Active")).Value) }; return(clothingMutation); }