ArcGIS Runtime SDK for iOS: <AGSJSONSerializable> Protocol Reference
ArcGIS Runtime SDK for iOS  100.15
<AGSJSONSerializable> Protocol Reference

Description

A protocol to convert objects to and from JSON.

This protocol must be adopted by all classes which wish to allow decoding/encoding from/to JSON. @define{AGSJSONSerializable.h, ArcGIS}

Since
100
Inheritance diagram for <AGSJSONSerializable>:
AGSArcGISMapServiceInfo AGSArcGISMapServiceSublayerInfo AGSArcadeExpression AGSBasemap AGSClassBreak AGSDomain AGSFacilityLayerDefinition AGSFeatureCollection AGSField AGSGeoModelFloorDefinition AGSGeometry AGSJSONSerializableBase AGSJob AGSLabelAngle AGSLabelDefinition AGSLabelStackSeparator AGSLayerFloorDefinition AGSLevelLayerDefinition AGSLicenseInfo AGSMap AGSPortalGroup AGSPortalInfo AGSPortalItem AGSPortalUser AGSRenderer AGSSiteLayerDefinition AGSSpatialReference AGSSymbol AGSUniqueValue AGSViewpoint

Instance Methods

(nullable id) - toJSON:
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 

Properties

NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 

Method Documentation

◆ fromJSON:error:

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequired

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

◆ toJSON:

- (nullable id) toJSON: (NSError **)  error
required

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

◆ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopy

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

◆ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopy

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100