     public let title: String?
     public let titleLink: String?
     public let text: String?
-    public let fields: [[String: AnyObject]]?
+    public let fields: [AttachmentField]?
     public let imageURL: String?
     public let thumbURL: String?
 

        attachment["title"] = title
        attachment["title_link"] = titleLink
        attachment["text"] = text
        attachment["fields"] = fields
        attachment["image_url"] = imageURL
        attachment["thumb_url"] = thumbURL
        return attachment
    }
    
}

        title = attachment?["title"] as? String
        titleLink = attachment?["title_link"] as? String
        text = attachment?["text"] as? String
        imageURL = attachment?["image_url"] as? String
        thumbURL = attachment?["thumb_url"] as? String
        fields = Attachment.fields(attachment?["fields"] as? [[String: AnyObject]])
    }
    
    public init?(fallback: String, title:String, colorHex: String? = nil, pretext: String? = nil, authorName: String? = nil, authorLink: String? = nil, authorIcon: String? = nil, titleLink: String? = nil, text: String? = nil, fields: [AttachmentField]? = nil, imageURL: String? = nil, thumbURL: String? = nil) {
        self.fallback = fallback
        self.color = colorHex
        self.pretext = pretext
