Protocols
The following protocols are available globally.
-
This is the protocol that makes your swift Models JSON parsable.
A typical implementation would be the following, preferably in an extension called
MyModel+JSON
to keep things nice and clean :
See more// MyModel+JSON.swift import Arrow extension MyModel: ArrowParsable { mutating func deserialize(json: JSON) { myVariable <-- json["jsonProperty"] //... } }
Declaration
Swift
public protocol ArrowParsable