SuperMap.Web.ISDotNET6.ThemeGridRange.FromJson C# (CSharp) Method

FromJson() static private method

static private FromJson ( System.Json.JsonObject jsonObject ) : ThemeGridRange
jsonObject System.Json.JsonObject
return ThemeGridRange
        internal static ThemeGridRange FromJson(JsonObject jsonObject)
        {
            if (jsonObject == null)
            {
                return null;
            }

            ThemeGridRange result = new ThemeGridRange();

            if (jsonObject.ContainsKey("breakValues") && jsonObject["breakValues"] != null && jsonObject["breakValues"].Count > 0)
            {
                result.BreakValues = new List<double>();
                for (int i = 0; i < jsonObject["breakValues"].Count; i++)
                {
                    result.BreakValues.Add(jsonObject["breakValues"][i]);
                }

            }
            if (jsonObject.ContainsKey("displays") && jsonObject["displays"] != null && jsonObject["displays"].Count > 0)
            {
                result.Displays = new List<ServerColor>();
                for (int i = 0; i < jsonObject["displays"].Count; i++)
                {
                    result.Displays.Add(ServerColor.FromJson(jsonObject["displays"][i]));
                }

            }
            result.Caption = (string)jsonObject["caption"];
            return result;
        }