 	}
 }
 
-extension Optional where T: CollectionType, T.Generator.Element: Encodable {
+extension Optional where Wrapped: CollectionType, Wrapped.Generator.Element: Encodable {
 	public func encode() -> JSON {
 		return self.map { $0.encode() } ?? .Null
 	}

	}
}

extension Optional where T: protocol<CollectionType, DictionaryLiteralConvertible>, T.Key: StringLiteralConvertible, T.Value: Encodable, T.Generator.Element == (T.Key, T.Value) {
	public func encode() -> JSON {
		return self.map { $0.encode() } ?? .Null
	}

	}
}

extension Optional where Wrapped: Encodable {
	public func encode() -> JSON {
		switch self {
		case .None:        return .Null
