toJsonElement

Converts an object to its JSON representation as a JsonElement.

Return

The JSON representation of the object as a JsonElement.