DocumentBuilder

Functions

Link copied to clipboard

Get a property's value as an Array, which is a mapping object of an array value. Returns null if the property doesn't exist, or its value is not an array.

Link copied to clipboard

Get a property's value as a Dictionary, which is a mapping object of a dictionary value. Returns null if the property doesn't exist, or its value is not a dictionary.

Link copied to clipboard

Removes the mapping for a key from this Dictionary

Link copied to clipboard
fun setArray(key: String, value: Array?): MutableDocument

Set an Array value for the given key

Link copied to clipboard
fun setBlob(key: String, value: Blob?): MutableDocument

Set a Blob value for the given key

Link copied to clipboard

Set a boolean value for the given key

Link copied to clipboard

Populate a document with content from a Map. Allowed value types are List, Date, Map, Number, null, String, Array, Blob, and Dictionary. If present, Lists, Maps and Dictionaries may contain only the above types. Setting the document content will replace the current data including the existing Array and Dictionary objects.

Link copied to clipboard

Set a Date value for the given key

Link copied to clipboard

Set a Dictionary value for the given key

Link copied to clipboard

Set a double value for the given key

Link copied to clipboard

Set a float value for the given key

Link copied to clipboard
fun setInt(key: String, value: Int): MutableDocument

Set an integer value for the given key

Link copied to clipboard

Populate a document with content from a JSON string. Allowed value types are List, Date, Map, Number, null, String, Array, Blob, and Dictionary. If present, Lists, Maps and Dictionaries may contain only the above types. Setting the document content will replace the current data including the existing Array and Dictionary objects.

Link copied to clipboard
fun setLong(key: String, value: Long): MutableDocument

Set a long value for the given key

Link copied to clipboard

Set a Number value for the given key

Link copied to clipboard

Set a String value for the given key

Link copied to clipboard
fun setValue(key: String, value: Any?): MutableDocument

Set an object value by key. Allowed value types are List, Date, Map, Number, null, String, Array, Blob, and Dictionary. If present, Lists, Maps and Dictionaries may contain only the above types. A Date object will be converted to an ISO-8601 format string.

Link copied to clipboard
infix fun <T> String.to(value: T)

Determines the key-to-value relation between the receiver string and the provided value.