ParseEncoder

public struct ParseEncoder

An object that encodes Parse instances of a data type as JSON objects.

Note

JSONEncoder facilitates the encoding of Encodable values into JSON. ParseEncoder facilitates the encoding of ParseType values into JSON. All Credit to Apple, this is a custom encoder with capability of skipping keys at runtime. ParseEncoder matches the features of the Swift 5.4 JSONEncoder . Update commits as needed for improvement.
  • Keys to skip during encoding.

    See more

    Declaration

    Swift

    public enum SkipKeys
  • Encodes an instance of the indicated ParseType.

    Declaration

    Swift

    public func encode<T: ParseType>(_ value: T,
                                     skipKeys: SkipKeys) throws -> Data

    Parameters

    value

    The ParseType instance to encode.

    skipKeys

    The set of keys to skip during encoding.