ristianNHenriksen.KotlinJson.1.0.source-code.JsonObject.kt Maven / Gradle / Ivy
import java.util.*
/**
* Created by Christian on 17/09/2016.
*/
data class JsonObject(val json: Map) {
/**
* @param key The key for the corresponding value.
* @return The Json element for the key. If the key does not exist an empty Json element is returned.
*/
operator fun get(key: String): Json {
val value = json[key]
return if (value != null) Json(value) else Json()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy