BrazeProperties

Defines and stores metadata about events and purchases.

Metadata is stored as properties represented by key-value pairs.

Property keys are non-empty strings <= 255 characters, with no leading dollar signs. Property values are be integers, doubles, booleans, java.util.Date objects, or strings <= 255 characters. All strings of length 255 characters will be truncated.

Constructors

Link copied to clipboard
Link copied to clipboard
fun BrazeProperties(jsonObject: JSONObject)

Creates an BrazeProperties object using JSON. Invalid keys and invalid string values are removed from the constructed object. JSONObject.NULL values are also removed if present.

Link copied to clipboard
fun BrazeProperties(map: Map<String, *>)

Creates an BrazeProperties object using Map. Invalid keys are removed from the constructed object.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Adds a key-value property pair to this BrazeProperties object. Note that invalid key-value pairs are logged and not added to the BrazeProperties object to preserve valid internal state at all times.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun forJsonPut(): JSONObject
Link copied to clipboard
operator fun get(key: String): Any?
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

To be valid, this object must be below com.braze.Constants.EVENT_PROPERTIES_MAX_SIZE_BYTES when converted to JSON via forJsonPut.

Link copied to clipboard
val size: Int