FastTransformer

public struct FastTransformer<Object, JSON> : ValueTransformable

Undocumented

  • 便捷的转换器

    Declaration

    Swift

    public init(fromJSON: @escaping (JSON?) -> Object?, toJSON: ((Object?) -> JSON?)? = nil)

    Parameters

    fromJSON

    json 转 object

    toJSON

    object 转 json, 如果不需要转json,可以不实现。

  • Declaration

    Swift

    public func transformFromJSON(_ value: Any) -> Object?
  • Declaration

    Swift

    public func transformToJSON(_ value: Object) -> JSON?