SmartURLTransformer
public struct SmartURLTransformer : ValueTransformable
Undocumented
-
Undocumented
Declaration
Swift
public typealias JSON = String
-
Undocumented
Declaration
Swift
public typealias Object = URL
-
Initializes a URLTransformer with an option to encode the URL string before converting it to NSURL
Declaration
Swift
public init(prefix: String? = nil, shouldEncodeURLString: Bool = true)
Parameters
shouldEncodeUrlString
When true (the default value), the string is encoded before being passed
Return Value
an initialized transformer
-
Declaration
Swift
public func transformFromJSON(_ value: Any) -> URL?
-
Declaration
Swift
public func transformToJSON(_ value: URL) -> String?