internal static DotMode ToDotMode(JSONObject jsonObj) { var dotMode = new DotMode(); dotMode.DotConnected = jsonObj["dotConnected"]; var feedbackList = new List <DotModeObjectCollection>(); var arr = jsonObj["feedback"]; foreach (var val in arr) { feedbackList.Add(DotModeObjectCollection.ToObject(val.Value.AsObject)); } dotMode.Feedback = feedbackList.ToArray(); return(dotMode); }
internal static DotMode ToDotMode(JsonObject jsonObj) { var dotMode = new DotMode(); dotMode.DotConnected = jsonObj.GetNamedBoolean("dotConnected"); var feedbackList = new List <DotModeObjectCollection>(); var arr = jsonObj.GetNamedArray("feedback", new JsonArray()); foreach (var val in arr) { feedbackList.Add(DotModeObjectCollection.ToObject(val.GetObject())); } dotMode.Feedback = feedbackList.ToArray(); return(dotMode); }