Newtonsoft.Json void Main() { var CaseTypConfigJSON = @"{""SOIROMInclusions"":[{""SOI"":""1"",""ROM"":""1""},{""SOI"":""1"",""ROM"":""2""},{""SOI"":""1"",""ROM"":""3""},{""SOI"":""1"",""ROM"":""4""},{""SOI"":""2"",""ROM"":""1""},{""SOI"":""2"",""ROM"":""2""},{""SOI"":""2"",""ROM"":""3""},{""SOI"":""2"",""ROM"":""4""},{""SOI"":""3"",""ROM"":""1""},{""SOI"":""3"",""ROM"":""2""},{""SOI"":""3"",""ROM"":""3""},{""SOI"":""3"",""ROM"":""4""},{""SOI"":""4"",""ROM"":""1""},{""SOI"":""4"",""ROM"":""2""},{""SOI"":""4"",""ROM"":""3""},{""SOI"":""4"",""ROM"":""4""}],""AgeCohortIDInclusions"":[5,6,7,8,9,10,3,4],""PhysicianIDExclusions"":[],""StandardDeviationExcludedTypeEnum"":0,""LengthOfStayThreshold"":0,""CPTCodes"":[],""PatientTypeRollupIDInclusions"":[3,2,1],""PhysicianMinVolume"":0}"; JsonConvert.DeserializeObject(CaseTypConfigJSON).Dump(); } // Define other methods and classes here public enum StandardDeviationExclusions { None = 0, TwoStdDev = 1, ThreeStdDev = 2, CustomLOSOutlier = 3 } [Serializable] public class CaseTypeConfiguration //: ICaseTypeConfiguration { public int PhysicianMinVolume { get; set; } = 0; } public class DRGCaseTypeConfiguration : CaseTypeConfiguration//, IDRGCaseTypeConfiguration { // ReSharper disable once InconsistentNaming public List AgeCohortIDInclusions { get; set; } = new List(); public List PhysicianIDExclusions { get; set; } = new List(); public StandardDeviationExclusions StandardDeviationExcludedTypeEnum { get; set; } = StandardDeviationExclusions.None; public int LengthOfStayThreshold { get; set; } = 0; public HashSet CPTCodes { get; set; } = new HashSet(); public List PatientTypeRollupIDInclusions { get; set; } = new List(); } [Serializable] public class SOIROMInclusion : IEquatable { public string SOI { get; set; } public string ROM { get; set; } public SOIROMInclusion() { } public SOIROMInclusion(string soi, string rom) { SOI = soi; ROM = rom; } public SOIROMInclusion(int soi, int rom) { SOI = soi.ToString(); ROM = rom.ToString(); } public bool Equals(SOIROMInclusion other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return string.Equals(ROM, other.ROM, StringComparison.OrdinalIgnoreCase) && string.Equals(SOI, other.SOI, StringComparison.OrdinalIgnoreCase); } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != this.GetType()) return false; return Equals((SOIROMInclusion)obj); } public override int GetHashCode() { unchecked { return ((ROM != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(ROM) : 0) * 397) ^ (SOI != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(SOI) : 0); } } } public class APRDRGCaseTypeConfiguration : DRGCaseTypeConfiguration { // ReSharper disable once InconsistentNaming public List SOIROMInclusions { get; set; } = new List(); }