make Days enum serialize to string

This commit is contained in:
Andrew Welker
2020-12-15 08:44:10 -07:00
parent 01ddf1721c
commit eb114b4a95

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Crestron.SimplSharp.Scheduler; using Crestron.SimplSharp.Scheduler;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Room.Config namespace PepperDash.Essentials.Room.Config
@@ -20,6 +21,7 @@ namespace PepperDash.Essentials.Room.Config
public string Name; public string Name;
[JsonProperty("days")] [JsonProperty("days")]
[JsonConverter(typeof(StringEnumConverter))]
public ScheduledEventCommon.eWeekDays Days; public ScheduledEventCommon.eWeekDays Days;
[JsonProperty("time")] [JsonProperty("time")]