SuperMap.Web.ISDotNET6.ServerGeometry.FromJson C# (CSharp) Method

FromJson() public static method

${IS6_ServerGeometry_method_FromJson_D}
public static FromJson ( System.Json.JsonObject jsonObject ) : ServerGeometry
jsonObject System.Json.JsonObject ${IS6_ServerGeometry_method_FromJson_param_jsonObject}
return ServerGeometry
        public static ServerGeometry FromJson(JsonObject jsonObject)
        {
            if (jsonObject == null)
            {
                return null;
            }
            ServerGeometry geometry = new ServerGeometry();
            geometry.Feature = (ServerFeatureType)(int)jsonObject["feature"];
            geometry.ID = (int)jsonObject["id"];
            JsonArray parts = (JsonArray)jsonObject["parts"];
            if (parts != null && parts.Count > 0)
            {
                geometry.Parts = new List<int>();
                for (int i = 0; i < parts.Count; i++)
                {
                    geometry.Parts.Add((int)parts[i]);
                }
            }
            JsonArray point2Ds = (JsonArray)jsonObject["points"];
            if (point2Ds != null && point2Ds.Count > 0)
            {
                geometry.Point2Ds = new Point2DCollection();
                for (int i = 0; i < point2Ds.Count; i++)
                {
                    geometry.Point2Ds.Add(JsonHelper.ToPoint2D((JsonObject)point2Ds[i]));
                }
            }
            return geometry;
        }