internal static string ToJson(ThemeGraphItem themeGraphItem)
{
if (themeGraphItem == null)
{
return null;
}
string json = "{";
List<string> list = new List<string>();
if (themeGraphItem.GraphExpression != null)
{
list.Add(string.Format("\"graphExpression\":\"{0}\"", themeGraphItem.GraphExpression));
}
if (themeGraphItem.UniformStyle != null)
{
list.Add(string.Format("\"uniformStyle\":{0}", ServerStyle.ToJson(themeGraphItem.UniformStyle)));
}
if (themeGraphItem.Caption != null)
{
list.Add(string.Format("\"caption\":\"{0}\"", themeGraphItem.Caption));
}
if (themeGraphItem.RangeSetting != null)
{
list.Add(string.Format("\"rangeSetting\":\"{0}\"", ThemeRange.ToJson(themeGraphItem.RangeSetting)));
}
json += string.Join(",", list.ToArray());
json += "}";
return json;
}