setData

inline suspend fun <T : Any> SyncDocument.setData(data: T)

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncDocument.

Type T must be annotated with @Serializable.

Parameters

data

New document data.

Throws

SerializationException

If the given value cannot be serialized to JSON object.

TwilioException

When error occurred while updating the document.