JSONEncodable
public protocol JSONEncodable: Encodable
JSONEncodable protocol for easily getting a JSON object from a conforming JSONCodable object. Conforms to Encodable protocol
-
jsonValue
Default 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?
-
jsonData
Default 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?
-
jsonEncoder
Default 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