         
         return nil
     }
-
+    
     public func convert<S>(toType type: S.Type) -> S.SequenceType.SupportedValue? where S : SerializableObject {
         if Data.self is S.SequenceType.SupportedValue, let data = self.data as? S.SequenceType.SupportedValue {
             return data

        
        self.init(dictionaryElements: elements)
    }

    public init<S>(sequence: S) where S : Sequence, S.Iterator.Element == Primitive {
        self.init(array: Array(sequence))
    }

    public typealias SequenceType = Document

    public func convert<S>() -> S? {
        if self is S {
            return self as? S
        }
        
        return nil
    }
    
    public var typeIdentifier: Byte {
        return isArray ? 0x04 : 0x03

    public func getKeyValuePairs() -> [String : Primitive] {
        return self.dictionaryValue
    }
    
    public typealias SupportedValue = Primitive
    public typealias HashableKey = String
    
    public init(dictionary: [String: Primitive]) {
        let elements: [(String, Primitive?)] = dictionary.map {
            ($0.0, $0.1)
