CodableHelper

open class CodableHelper
  • Declaration

    Swift

    public static var dateFormatter: DateFormatter { get set }
  • Declaration

    Swift

    public static var jsonDecoder: JSONDecoder { get set }
  • Declaration

    Swift

    public static var jsonEncoder: JSONEncoder { get set }
  • Declaration

    Swift

    open class func decode<T>(_ type: T.Type, from data: Data) -> Swift.Result<T, Error> where T : Decodable
  • Declaration

    Swift

    open class func encode<T>(_ value: T) -> Swift.Result<Data, Error> where T : Encodable
  • Declaration

    Swift

    open class func toErrorBody(_ data: Data?) -> [String : Any]?