AnyModel

public protocol AnyModel : ObjectType

通用编码模型协议,默认兼容BasicTypelJSON|CodableMode|JSONModel,可扩展

  • decodeModel(from:designatedPath:) Default implementation

    从Object解码成可选Model,当object为字典和数组时支持具体路径

    Default Implementation

    默认实现从Object解码成可选Model,当object为字典和数组时支持具体路径

    Declaration

    Swift

    static func decodeModel(from object: Any?, designatedPath: String?) -> Self?
  • decodeSafeModel(from:designatedPath:) Default implementation

    从Object安全解码成Model,当object为字典和数组时支持具体路径

    Default Implementation

    默认实现从Object安全解码成Model,当object为字典和数组时支持具体路径

    Declaration

    Swift

    static func decodeSafeModel(from object: Any?, designatedPath: String?) -> Self
  • encodeObject() Default implementation

    从Model编码成Object

    Default Implementation

    默认实现从Model编码成Object

    Declaration

    Swift

    func encodeObject() -> Any?

Available where Self: BasicType

  • decodeModel(from:designatedPath:) Default implementation

    Default Implementation

    默认实现从Object解码成可选Model,当object为字典和数组时支持具体路径

    Declaration

    Swift

    public static func decodeModel(from object: Any?, designatedPath: String? = nil) -> Self?
  • encodeObject() Default implementation

    Default Implementation

    默认实现从Model编码成Object

    Declaration

    Swift

    public func encodeObject() -> Any?

Available where Self == JSON

  • decodeModel(from:designatedPath:) Default implementation

    Default Implementation

    默认实现从Object解码成可选Model,当object为字典和数组时支持具体路径

    Declaration

    Swift

    public static func decodeModel(from object: Any?, designatedPath: String? = nil) -> Self?
  • encodeObject() Default implementation

    Default Implementation

    默认实现从Model编码成Object

    Declaration

    Swift

    public func encodeObject() -> Any?

Available where Self: CodableModel

  • decodeModel(from:designatedPath:) Default implementation

    Default Implementation

    默认实现从Object解码成可选Model,当object为字典和数组时支持具体路径

    Declaration

    Swift

    public static func decodeModel(from object: Any?, designatedPath: String? = nil) -> Self?
  • encodeObject() Default implementation

    Default Implementation

    默认实现从Model编码成Object

    Declaration

    Swift

    public func encodeObject() -> Any?

Available where Self: JSONModel

  • decodeModel(from:designatedPath:) Default implementation

    Default Implementation

    默认实现从Object解码成可选Model,当object为字典和数组时支持具体路径

    Declaration

    Swift

    public static func decodeModel(from object: Any?, designatedPath: String? = nil) -> Self?
  • encodeObject() Default implementation

    Default Implementation

    默认实现从Model编码成Object

    Declaration

    Swift

    public func encodeObject() -> Any?

Available where Self: JSONModelCustomTransformable

  • decodeModel(from:designatedPath:) Default implementation

    Default Implementation

    默认实现从Object解码成可选Model,当object为字典和数组时支持具体路径

    Declaration

    Swift

    public static func decodeModel(from object: Any?, designatedPath: String? = nil) -> Self?
  • encodeObject() Default implementation

    Default Implementation

    默认实现从Model编码成Object

    Declaration

    Swift

    public func encodeObject() -> Any?

Available where Self: JSONModelEnum

  • decodeModel(from:designatedPath:) Default implementation

    Default Implementation

    默认实现从Object解码成可选Model,当object为字典和数组时支持具体路径

    Declaration

    Swift

    public static func decodeModel(from object: Any?, designatedPath: String? = nil) -> Self?
  • encodeObject() Default implementation

    Default Implementation

    默认实现从Model编码成Object

    Declaration

    Swift

    public func encodeObject() -> Any?