convertToMapOf

Deprecated

Use asMapOf() instead

Replace with

let { WebcomResult { it.asMapOf(type) } }

Converts this DatasyncValue to a Map of a given T type.

If the underlying tree-like value is not a tree but a primitive type (boolean, string or number) or if one of the branches cannot be converted to a T instance, returns a WebcomResult.Failure instance with the error.