StyleEncodable

public protocol StyleEncodable

A protocol describing a style-related entity that can be encoded.

  • Converts this object to a dictionary representation

    Declaration

    Swift

    func jsonObject() throws -> [String : Any]

    Return Value

    The dictionary represtantion of self.

  • jsonObject() Default implementation

    Default Implementation

    Given an Encodable object return the JSON dictionary representation

    Throws

    Errors occurring during encoding, or TypeConversionError.invalidJSONObject

    Declaration

    Swift

    func jsonObject() throws -> [String : Any]

    Return Value

    A JSON dictionary representing the object.

  • allStyleProperties() Extension method

    Encodes the receiver into a Dictionary representation.

    Declaration

    Swift

    func allStyleProperties() throws -> [String : Any]

    Return Value

    A dictionary representation of the receiver.