Datasync Value
Represents a tree-like value stored by the Webcom datasync service within its real-time database.
This class provides methods to easily convert it to native primitive or composite types (Boolean, String, Number, Map, List) or business objects (kotlinx.serialization.Serializable-annotated classes or POJO classes).
Functions
Gets the child node of this value (interpreted as a node representing a list) at a given index in the list.
Gets the child node of this value at a given key.
Gets the child node of this value (interpreted as a node representing a list) at a given index in the list.
Gets the child node of this value at a given key.
Convenient shortcut to convertToListOf, which returns null
in case of failure.
Convenient shortcut to convertToMapOf, which returns null
in case of failure.
Converts this DatasyncValue to a given T type.
Converts this DatasyncValue to a List of a given T type.
Converts this DatasyncValue to a Map of a given T type.
Checks if this value is a node representing a list with a child node at the given index in the list.
Checks if this value is a node with a child node at a given key.
Attempt to convert this value using the given convert function and return the converted value if it succeeds or null
if it fails.
Properties
Gets this value as a composite List of TreeLikeData values.
Gets this value as a composite Map of TreeLikeData values.