JSONEncodable
public protocol JSONEncodable : Encodable
A type that can encode itself to a JSON representation.
-
data()
Default implementationEncodes the given type to a JSON representation suitable for the Spotify Web API.
Throws
Any errors encountered during encoding. See EncodingError for more details.Default Implementation
Declaration
Swift
func data() throws -> Data
Return Value
A
Data
value containing the payload.