ArcGIS Pro 3.7 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 Function ToJson() As String
    public string ToJson()

    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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also