EncodableModel

public protocol EncodableModel : Encodable

Helper providing informations to sucessfully encode each model. Each CoinapaprikaAPI Model conforms to this protocol. Use encoder properties if you want to store our models.

  • encoder Default implementation

    JSONDecoder ready to encode the model.

    Default Implementation

    Declaration

    Swift

    static var encoder: JSONEncoder { get }
  • dateEncodingStrategy Default implementation

    DateEncodingStrategy for JSONEncoder, it could be either iso8601 or unix timestamp. Use it only if you want to build your own encoder.

    Default Implementation

    Declaration

    Swift

    static var dateEncodingStrategy: JSONEncoder.DateEncodingStrategy? { get }