${iServerJava6R_LabelMixedTextStyle_Title}

${iServerJava6R_LabelMixedTextStyle_Description}

        internal static LabelMixedTextStyle FromJson(JsonObject json)
        {
            if (json == null) return null;
            LabelMixedTextStyle textStyle = new LabelMixedTextStyle();
            textStyle.DefaultStyle = ServerTextStyle.FromJson((JsonObject)json["defaultStyle"]);
            textStyle.Separator = (string)json["separator"];
            textStyle.SeparatorEnabled = (bool)json["separatorEnabled"];

            if ((JsonArray)json["splitIndexes"] != null && ((JsonArray)json["splitIndexes"]).Count > 0)
            {
                List<int> list = new List<int>();
                foreach (int item in (JsonArray)json["splitIndexes"])
                {
                    list.Add(item);
                }
                textStyle.SplitIndexes = list;
            }

            if (json["styles"] != null)
            {
                List<ServerTextStyle> textStyleList = new List<ServerTextStyle>();
                foreach (JsonObject item in (JsonArray)json["styles"])
                {
                    textStyleList.Add(ServerTextStyle.FromJson(item));
                }
                textStyle.Styles = textStyleList;
            }

            return textStyle;
        }
        internal static string ToJson(LabelMixedTextStyle labelMixedTextStyle)
        {
            string json = "{";
            System.Collections.Generic.List<string> list = new List<string>();

            if (labelMixedTextStyle.DefaultStyle != null)
            {
                list.Add(string.Format("\"defaultStyle\":{0}", ServerTextStyle.ToJson(labelMixedTextStyle.DefaultStyle)));
            }
            else
            {
                list.Add(string.Format("\"defaultStyle\":{0}", ServerTextStyle.ToJson(new ServerTextStyle())));
            }

            if (!string.IsNullOrEmpty(labelMixedTextStyle.Separator))
            {
                list.Add(string.Format("\"separator\":\"{0}\"", labelMixedTextStyle.Separator));
            }
            else
            {
                list.Add("\"separator\":\"\"");
            }

            list.Add(string.Format("\"separatorEnabled\":{0}", labelMixedTextStyle.SeparatorEnabled.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLower()));

            if (labelMixedTextStyle.SplitIndexes != null && labelMixedTextStyle.SplitIndexes.Count > 0)
            {
                List<string> splitList = new List<string>();
                for (int i = 0; i < labelMixedTextStyle.SplitIndexes.Count; i++)
                {
                    splitList.Add(string.Format("{0}", labelMixedTextStyle.SplitIndexes[i].ToString(System.Globalization.CultureInfo.InvariantCulture)));
                }
                list.Add(string.Format("\"splitIndexes\":[{0}]", string.Join(",", splitList.ToArray())));
            }
            else
            {
                list.Add("\"splitIndexes\":[]");
            }

            if (labelMixedTextStyle.Styles != null && labelMixedTextStyle.Styles.Count > 0)
            {
                List<string> stylesList = new List<string>();
                foreach (var item in labelMixedTextStyle.Styles)
                {
                    stylesList.Add(ServerTextStyle.ToJson(item));
                }

                list.Add(string.Format("\"styles\":[{0}]", string.Join(",", stylesList.ToArray())));
            }
            else
            {
                list.Add("\"styles\":[]");
            }
            json += string.Join(",", list.ToArray());

            json += "}";
            return json;
        }