${iServerJava6R_ThemeGridUnique_Title}

${iServerJava6R_ThemeGridUnique_Description}

Inheritance: Theme
        internal static ThemeGridUnique FromJson(JsonObject json)
        {
            if (json == null) return null;
            ThemeGridUnique themeGridUnique = new ThemeGridUnique();

            if (json["items"] != null && json["items"].Count > 0)
            {
                List<ThemeGridUniqueItem> itemsList = new List<ThemeGridUniqueItem>();
                foreach (JsonObject item in (JsonArray)json["items"])
                {
                    itemsList.Add(ThemeGridUniqueItem.FromJson(item));
                }

                themeGridUnique.Items = itemsList;
            }

            if (json["defaultcolor"] != null)
            {
                themeGridUnique.DefaultColor = ServerColor.FromJson((JsonObject)json["defaultcolor"]);
            }

            return themeGridUnique;
        }
        internal static string ToJson(ThemeGridUnique themeGridUnique)
        {
            string json = "{";
            List<string> list = new List<string>();

            if (themeGridUnique.Items != null && themeGridUnique.Items.Count >= 1)
            {
                List<string> tempTUI = new List<string>();
                foreach (var item in themeGridUnique.Items)
                {
                    tempTUI.Add(ThemeGridUniqueItem.ToJson(item));
                }

                list.Add(string.Format("\"items\":[{0}]", String.Join(",", tempTUI.ToArray())));
            }
            else
            {
                list.Add("\"items\":[]");
            }

            if (themeGridUnique.DefaultColor != null)
            {
                list.Add(string.Format("\"defaultColor\":{0}", ServerColor.ToJson(themeGridUnique.DefaultColor)));
            }
            else
            {
                list.Add(string.Format("\"defaultColor\":{0}", ServerColor.ToJson(new ServerColor())));
            }

            list.Add("\"type\":\"GRIDUNIQUE\"");

            json += string.Join(",", list.ToArray());
            json += "}";

            return json;
        }