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

    }
    
    /// Used internally to serialize a `Column` model to JSON.
    public func toJSON() -> JSON {
        var json = [String: JSON]()
        json["key"] = .string(key)
        json["type"] = type?.toJSON()
        json["goal"] = goal?.toJSON()
        if let isObjective = isObjective {
            json["is_objective"] = .bool(isObjective)
        }
        json["range"] = range?.toJSON()
        if let preference = preference {
            json["preference"] = .array(preference.map { .string($0) })
        }
        if let significantGain = significantGain {
            json["significant_gain"] = .double(significantGain)
        }
        if let significantLoss = significantLoss {
            json["significant_loss"] = .double(significantLoss)
        }
        if let insignificantLoss = insignificantLoss {
            json["insignificant_loss"] = .double(insignificantLoss)
        }
        if let format = format {
            json["format"] = .string(format)
        }
        if let fullName = fullName {
            json["full_name"] = .string(fullName)
        }
        if let description = description {
            json["description"] = .string(description)
        }
        return .dictionary(json)
    }
    
    /// Used internally to initialize a `Column` model from JSON.

    /// 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
