ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / Unit Class / ToJson Method

In This Topic
    ToJson Method (Unit)
    In This Topic
    Gets the JSON representation of the unit in terms of the WKID. A custom unit has WKID = 0.
    Syntax
    public string ToJson()
    Public Function ToJson() As String

    Return Value

    JSON string
    Exceptions
    ExceptionDescription
    The unit type is Grid or the unit type is Angular and the factory code is one of the following:
    • MGRS = 909000
    • USNG = 909001
    • UTM = 909002
    • DecimalDegree = 909003
    • DMS = 909004
    • DegreeDecimalMinute = 909005
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also