ArcGIS Pro 2.8 API Reference Guide
ToJson Method (Unit)

ArcGIS.Core.Geometry Namespace > Unit Class : ToJson Method
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 10, Windows 8.1

See Also

Reference

Unit Class
Unit Members