${iServerJava6R_ThemeRangeItem_Title}

${iServerJava6R_ThemeRangeItem_Description}

        internal static ThemeRangeItem FromJson(JsonObject json)
        {
            if (json == null) return null;
            ThemeRangeItem item = new ThemeRangeItem();

            item.Caption = json["caption"];
            item.End = (double)json["end"];
            item.Start = (double)json["start"];
            if (json["style"] != null)
            {
                item.Style = ServerStyle.FromJson((JsonObject)json["style"]);
            }
            item.Visible = (bool)json["visible"];
            return item;
        }
        internal static string ToJson(ThemeRangeItem themeRangeItem)
        {
            string json = "{";
            List<string> list = new List<string>();

            if (!string.IsNullOrEmpty(themeRangeItem.Caption))
            {
                list.Add(string.Format("\"caption\":\"{0}\"", themeRangeItem.Caption));
            }
            else
            {
                list.Add("\"caption\":\"\"");
            }

            if (themeRangeItem.Style != null)
            {
                list.Add(string.Format("\"style\":{0}", ServerStyle.ToJson(themeRangeItem.Style)));
            }
            else
            {
                list.Add(string.Format("\"style\":{0}", ServerStyle.ToJson(new ServerStyle())));
            }

            list.Add(string.Format("\"visible\":{0}", themeRangeItem.Visible.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLower()));

            list.Add(string.Format("\"end\":{0}", themeRangeItem.End.ToString(System.Globalization.CultureInfo.InvariantCulture)));

            list.Add(string.Format("\"start\":{0}", themeRangeItem.Start.ToString(System.Globalization.CultureInfo.InvariantCulture)));

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