SuperMap.Web.iServerJava6R.ThemeLabelBackSetting.ToJson C# (CSharp) Method

ToJson() static private method

static private ToJson ( ThemeLabelBackSetting labelBackSetting ) : string
labelBackSetting ThemeLabelBackSetting
return string
        internal static string ToJson(ThemeLabelBackSetting labelBackSetting)
        {
            string json = "";
            System.Collections.Generic.List<string> list = new System.Collections.Generic.List<string>();

            if (labelBackSetting.BackStyle != null)
            {
                list.Add(string.Format("\"backStyle\":{0}", ServerStyle.ToJson(labelBackSetting.BackStyle)));
            }
            else
            {
                list.Add(string.Format("\"backStyle\":{0}", ServerStyle.ToJson(new ServerStyle())));
            }

            list.Add(string.Format("\"labelBackShape\":\"{0}\"", labelBackSetting.LabelBackShape));
            json = string.Join(",", list.ToArray());
            return json;
        }