${REST_LabelImageCell_Title}
${REST_LabelImageCell_Description}
internal static string ToJson(LabelImageCell imageCell) { string json = "{"; List<string> list = new List<string>(); list.Add(string.Format("\"pathField\":\"{0}\"", imageCell.PathField)); list.Add(string.Format("\"sizeFixed\":{0}", imageCell.SizeFixed.ToString().ToLower())); list.Add(string.Format("\"height\":{0}", imageCell.Height)); list.Add(string.Format("\"width\":{0}", imageCell.Width)); list.Add(string.Format("\"rotation\":{0}", imageCell.Rotation)); list.Add(string.Format("\"type\":\"{0}\"", imageCell.Type)); json += string.Join(",", list.ToArray()); json += "}"; return json; }
internal static LabelImageCell FromJson(JsonObject json) { if (json == null) return null; LabelImageCell imageCell = new LabelImageCell(); imageCell.Height = json["height"].GetNumberEx(); imageCell.PathField = json["pathField"].GetStringEx(); imageCell.Rotation = json["rotation"].GetNumberEx(); imageCell.SizeFixed = json["sizeFixed"].GetBooleanEx(); imageCell.Width = json["width"].GetNumberEx(); if (json.ContainsKey("type") && json["type"] != null) { imageCell.Type = (LabelMatrixCellType)Enum.Parse(typeof(LabelMatrixCellType), json["type"].GetStringEx(), true); } return imageCell; }