divkit.dsl.Component.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-json-builder Show documentation
Show all versions of kotlin-json-builder Show documentation
DivKit is an open source Server-Driven UI (SDUI) framework. SDUI is a an emerging technique that leverage the server to build the user interfaces of their mobile app.
package divkit.dsl
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonIgnore
import java.util.HashMap
import kotlin.Any
import kotlin.String
import kotlin.collections.Map
class Component internal constructor(
@JsonIgnore
val template: Template,
@JsonIgnore
val properties: Map,
) : Div {
@JsonAnyGetter
internal fun getJsonProperties(): Map {
val result = HashMap(properties.size + 1)
result.put("type", template.name)
result.putAll(properties)
return result
}
}