Encoding and Decoding BSON

  • BSONEncoder facilitates the encoding of Encodable values into BSON.

    See more

    Declaration

    Swift

    public class BSONEncoder
  • BSONDecoder facilitates the decoding of BSON into semantic Decodable types.

    See more

    Declaration

    Swift

    public class BSONDecoder
  • Enum representing the various encoding/decoding strategy pairs for Dates. Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when converting Datas between their BSON representations and their representations in (non BSONDocument) Codable types.

    As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic binary subtype.

    See also

    bsonspec.org
    See more

    Declaration

    Swift

    public enum DataCodingStrategy : RawRepresentable
  • Enum representing the various encoding/decoding strategy pairs for Dates. Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when converting Dates between their BSON representations and their representations in (non BSONDocument) Codable types.

    As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

    See also

    bsonspec.org
    See more

    Declaration

    Swift

    public enum DateCodingStrategy : RawRepresentable
  • Enum representing the various encoding/decoding strategy pairs for Dates. Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when converting UUIDs between their BSON representations and their representations in (non BSONDocument) Codable types.

    As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID subtype.

    See also

    bsonspec.org
    See more

    Declaration

    Swift

    public enum UUIDCodingStrategy : RawRepresentable
  • Protocol indicating a set of options can be used to configure BSONEncoder and BSONDecoder.

    See more

    Declaration

    Swift

    public protocol CodingStrategyProvider
  • Options struct used for configuring the coding strategies on BSONEncoder and BSONDecoder.

    See more

    Declaration

    Swift

    public struct BSONCoderOptions : CodingStrategyProvider