Public Shared Function FromJson( _ ByVal jsonString As String _ ) As SpatialReference
public static SpatialReference FromJson( string jsonString )
Parameters
- jsonString
- JSON string representation of a SpatialReference.
Public Shared Function FromJson( _ ByVal jsonString As String _ ) As SpatialReference
public static SpatialReference FromJson( string jsonString )
| Exception | Description |
|---|---|
| System.ArgumentNullException | The jsonString is empty or null. |
{
SpatialReference srWithVertical = SpatialReferenceBuilder.CreateSpatialReference(4326, 6916);
string xml = srWithVertical.ToXml();
SpatialReference importedSR = SpatialReferenceBuilder.FromXml(xml);
// importedSR.Wkid = 4326
// importedSR.VcsWkid = 6916
string json = srWithVertical.ToJson();
importedSR = SpatialReferenceBuilder.FromJson(json);
// importedSR.Wkid = 4326
// importedSR.VcsWkid = 6916
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)