         }
         name = try? json.getString(at: "name")
         descriptionHTML = try? json.getString(at: "description_html")
-        appData = json["app_data"]
-    }
-}
+        appData = try json.getJSON(at: "app_data")
+    }
+}

    /// Application-specific data available to the hosting application; the service carries but
    /// does not use the data. Used only by the Tradeoff Analytics widget; not part of the
    /// problem definition.
    public let appData: JSON?
    
    /**
     Initialize an `Option` for a decision problem (i.e. a row in a tabular representation of

    }
 
    /// Used internally to serialize an `Option` model to JSON.
    public func toJSONObject() -> Any {
        var json = [String: Any]()
        json["key"] = key
        json["values"] = values.map { $0.toJSONObject() }
        if let name = name {
            json["name"] = name
        }
        if let descriptionHTML = descriptionHTML {
            json["description_html"] = descriptionHTML
        }
        if let appData = appData {
            json["app_data"] = appData
        }
        return json
    }

    /// Used internally to initialize an `Option` model from JSON.
