field

inline fun <V> Document<*>.field(prop: KProperty1<*, V>, default: V): ReadWriteProperty<Any?, V>(source)

A property delegate backed by the single decomposed key for prop on this document.

Reading a never-set field returns default; writing updates only that field's key and emits on the document's Document.flow. The field's value type is serialized with its standard serializer.