JSONEncodable
public protocol JSONEncodable: Encodable
JSONEncodable protocol for easily getting a JSON object from a conforming JSONCodable object. Conforms to Encodable protocol
-
jsonValueDefault implementationJSON representation of JSONCodable object
Default Implementation
- return JSON represendation of the JSONCodable object or nil if the encode fails
Declaration
Swift
var jsonValue: JSON? -
jsonDataDefault implementationJSON data representation of JSONCodable object
Default Implementation
- return data represendation of the JSONCodable object or nil if the encode fails
Declaration
Swift
var jsonData: Data? -
jsonEncoderDefault implementationDeafult JSONEncoder. This is mainly to be used by child protocols that need custom encoders
Default Implementation
-return basic JSONEncoder. This is meant to be used by child protocols that need custom encoders
Declaration
Swift
static var jsonEncoder: JSONEncoder
View on GitHub
JSONEncodable Protocol Reference