         
         self.typeName = name
         self.contentType = contentType
-        self.data = json["data"]
+        self.data = json[CodingKeys.data]
     }
     
     fileprivate init() {

    /// - Returns: A deserialized instance of this component type
    /// - Throws: Any type of error during deserialization.
    public init(json: JSON) throws {
        guard let name = json["typeName"].string else {
            throw DeserializationError.invalidSerialized(message: "Missing 'typeName'")
        }
        guard let type = json["contentType"].string else {
            throw DeserializationError.invalidSerialized(message: "Missing 'contentType'")
        }
        guard let contentType = ContentType(rawValue: type) else {
            throw DeserializationError.invalidSerialized(message: "Invalid content type \(type)")
        }
        if json["data"].type == .null || json["data"].type == .unknown {
            throw DeserializationError.invalidSerialized(message: "Missing 'data'")
        }
        if let presets = json["presets"].array {
            self.presets = try presets.map { try SerializedPreset(json: $0) }
        } else {
            self.presets = []

    /// - Returns: The serialized state for this object.
    public func serialized() -> JSON {
        return [
            CodingKeys.typeName.rawValue: typeName,
            CodingKeys.contentType.rawValue: contentType.rawValue,
            CodingKeys.presets.rawValue: presets.map { $0.serialized().object },
            CodingKeys.data.rawValue: data.object
        ]
    }
    
