package it.danieleverducci.openweddingapp.entities

import org.json.JSONObject

/**
 * A wifi network provided by the wedding organization or restaurant
 */
class WifiNetwork: Jsonable {
    val ssid: String
    val password: String

    constructor(jo: JSONObject) {
        this.ssid = jo.getString("ssid")
        this.password = jo.getString("password")
    }

    override fun toJson(): JSONObject {
        val json = JSONObject()
        json.put("ssid", ssid)
        json.put("password", password)
        return json
    }
}