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

        values: [String: OptionValue],
        name: String? = nil,
        descriptionHTML: String? = nil,
        appData: JSON? = nil)
    {
        self.key = key
        self.values = values

    /// 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: Any?
    
    /**
     Initialize an `Option` for a decision problem (i.e. a row in a tabular representation of
