BoxModel
public protocol BoxModel
Defines Box SDK model behavior
-
Raw data from the API that populates the model
Declaration
Swift
var rawData: [String : Any] { get }
-
init(json:
Default implementation) Initializer.
Throws
Decoding errorDefault Implementation
“Deserialization” is just initialization the model with the original JSON. Initializer.
Throws
Decoding errorDeclaration
Swift
init(json: [String : Any]) throws
Parameters
json
JSON in a dictionary form
-
Initializer.
Throws
Decoding errorDeclaration
Swift
init(json: Data) throws
Parameters
json
JSON data
-
json()
Default implementationGets JSON string for a Box model object.
Default Implementation
Gets JSON string for a Box model object.
Declaration
Swift
func json() -> String
Return Value
JSON string
-
toJSONString()
Extension methodGets JSON string for a Box model object.
Declaration
Swift
func toJSONString() -> String
Return Value
JSON string