SCPJSONDecodable

@protocol SCPJSONDecodable <NSObject>

Objects conforming to this protocol can be instantiated by decoding a JSON dictionary.

  • Parses a JSON dictionary into an instance of the class. Returns nil if the object could not be decoded.

    Declaration

    Objective-C

    + (nullable instancetype)decodedObjectFromJSON:(nullable NSDictionary *)json;
  • The raw JSON used to create the object. This may be useful for accessing fields that haven’t yet been made into properties in the SDK.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDictionary *_Nonnull originalJSON;