${IS6_BusLine_Title}

${IS6_BusLine_Description}

        /// <summary>${IS6_BusLine_method_fromJSON_D}</summary>
        /// <returns>${IS6_BusLine_method_fromJSON_Return}</returns>
        /// <param name="jsonObject">${IS6_BusLine_method_fromJSON_param}</param>
        public static BusLine FromJson(JsonObject jsonObject)
        {
            if (jsonObject == null)
            {
                return null;
            }

            BusLine result = new BusLine();

            result.LineName = jsonObject["lineName"];
            result.SmID = jsonObject["smId"];
            result.LineID = jsonObject["lineId"];
            result.DirectionSign = jsonObject["directionSign"];

            if (jsonObject["points"] != null)
            {
                result.Points = new Point2DCollection();
                for (int i = 0; i < jsonObject["points"].Count; i++)
                {
                    result.Points.Add(JsonHelper.ToPoint2D((JsonObject)jsonObject["points"][i]));
                }
            }

            return result;
        }
        internal static string ToJson(BusLine param)
        {
            if (param == null)
            {
                return null;
            }

            string json = "{";
            List<string> list = new List<string>();

            list.Add(string.Format("\"lineName\":\"{0}\"", param.LineName));
            list.Add(string.Format("\"smId\":{0}", param.SmID));
            list.Add(string.Format("\"lineId\":{0}", param.LineID));

            if (param.DirectionSign != null)
            {
                list.Add(string.Format("\"directionSign\":\"{0}\"", param.DirectionSign));
            }
            else
            {
                list.Add("\"directionSign\":null");
            }

            if (param.Points != null)
            {
                list.Add(string.Format("\"points\":{0}", JsonHelper.FromPoint2DCollection(param.Points)));
            }
            else
            {
                list.Add("\"points\":null");
            }

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