Ios Swift 3-错误';上下文类型';任何对象';不能与字典文字';

Ios Swift 3-错误';上下文类型';任何对象';不能与字典文字';,ios,json,swift,geojson,Ios,Json,Swift,Geojson,我已经通过Cocoapods下载了“GeoJSON”pod。但当我尝试运行我的应用程序时,我收到了以下错误 错误:上下文类型“AnyObject”不能与字典文本一起使用 我是这样解决的 public var dictionaryRepresentation: [String: Any] { return [ "geometry": [ "coordinates": self.geometryCoordinates,

我已经通过Cocoapods下载了“GeoJSON”pod。但当我尝试运行我的应用程序时,我收到了以下错误

错误:上下文类型“AnyObject”不能与字典文本一起使用

我是这样解决的

public var dictionaryRepresentation: [String: Any] {
        return [
            "geometry": [
                "coordinates": self.geometryCoordinates,
                "type": Self.type
            ] as [String: Any],
            "type": "Feature",
            "properties": [:]
        ]
    }
public var dictionaryRepresentation: [String: Any] {
        return [
            "geometry": [
                "coordinates": self.geometryCoordinates,
                "type": Self.type
            ] as [String: Any],
            "type": "Feature",
            "properties": [:]
        ]
    }