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

ToJson() static private method

static private ToJson ( LabelSymbolCell symbolCell ) : string
symbolCell LabelSymbolCell
return string
        internal static string ToJson(LabelSymbolCell symbolCell)
        {
            string json = "{";
            List<string> list = new List<string>();

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

            list.Add(string.Format("\"type\":\"{0}\"", symbolCell.Type));

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

            return json;
        }