SmartEncodable

public protocol SmartEncodable : Encodable

Undocumented

SmartEncodable

  • toDictionary(options:) Extension method

    Serializes into a dictionary

    Declaration

    Swift

    public func toDictionary(options: Set<SmartEncodingOption>? = nil) -> [String : Any]?

    Parameters

    options

    encoding options

    Return Value

    dictionary

  • Serializes into a JSON string

    Declaration

    Swift

    public func toJSONString(options: Set<SmartEncodingOption>? = nil, prettyPrint: Bool = false) -> String?

    Parameters

    options

    encoding options

    prettyPrint

    Whether to format print (adds line breaks in the JSON)

    Return Value

    JSON string