ObjectDeserializer
public enum ObjectDeserializer
Provides methods for deserialization JSON data to custom objects
-
Deserializes
Data?object to the type that conforms toBoxModeland returns aResultof this type if success orBoxSDKErroron failure.Declaration
Swift
public static func deserialize<ReturnType>(data: Data?) -> Result<ReturnType, BoxSDKError> where ReturnType : BoxModelParameters
dataBinary data to deserialize
Return Value
Returns an object if success otherwise error
-
Deserializes
BoxResponseobject to the type that conforms toDecodableand returns aResultof this type if success orBoxSDKErroron failure.Declaration
Swift
public static func deserialize<ReturnType>(response: BoxResponse) -> Result<ReturnType, BoxSDKError> where ReturnType : DecodableParameters
responseThe
BoxResponseobject whichbodywill be deserializeReturn Value
Returns an object if success otherwise error
ObjectDeserializer Enumeration Reference