This guide is mainly focused on Android (Kotlin/Java).

## Data serialization

When using custom events and global event properties you may need to serialize the data to one of SDK’s supported formats:

  • `JSONObject`

  • `Bundle`

  • json `String`

For all examples we going to use this data class as an input to the serialization:



### Serialize as an JSONObject



### Serialize as a Bundle



### Serialize as a json String

If you are using `Gson` (or any other similar library) you might prefer this way of serializing data for SDK API methods.