internal static ServerTextStyle FromJson(JsonObject json)
{
if (json == null) return null;
ServerTextStyle textStyle = new ServerTextStyle();
textStyle.Align = (TextAlignment)Enum.Parse(typeof(TextAlignment), json["align"], true);
textStyle.BackColor = ServerColor.FromJson((JsonObject)json["backColor"]).ToColor();
textStyle.BackOpaque = (bool)json["backOpaque"];
textStyle.Bold = (bool)json["bold"];
textStyle.FontHeight = (double)json["fontHeight"];
textStyle.FontName = json["fontName"];
textStyle.FontWeight = (int)json["fontWeight"];
textStyle.FontWidth = (double)json["fontWidth"];
textStyle.ForeColor = ServerColor.FromJson((JsonObject)json["foreColor"]).ToColor();
textStyle.Italic = (bool)json["italic"];
textStyle.ItalicAngle = (double)json["italicAngle"];
textStyle.OpaqueRate = (int)json["opaqueRate"];
textStyle.Outline = (bool)json["outline"];
textStyle.Rotation = (double)json["rotation"];
textStyle.Shadow = (bool)json["shadow"];
textStyle.SizeFixed = (bool)json["sizeFixed"];
textStyle.Strikeout = (bool)json["strikeout"];
textStyle.Underline = (bool)json["underline"];
return textStyle;
}