ArcGIS Pro 2.7 API Reference Guide
FromJson Method (SpatialReferenceBuilder)
Example 

ArcGIS.Core.Geometry Namespace > SpatialReferenceBuilder Class : FromJson Method
JSON string representation of a SpatialReference.
Creates a new instance of a SpatialReference class from a JSON string representation.
Syntax
public static SpatialReference FromJson( 
   string JSONString
)
Public Shared Function FromJson( _
   ByVal JSONString As String _
) As SpatialReference

Parameters

JSONString
JSON string representation of a SpatialReference.

Return Value

Exceptions
ExceptionDescription
The JSONString is empty or null.
Example
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
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

SpatialReferenceBuilder Class
SpatialReferenceBuilder Members