put
Adds a custom metadata field with a JsonElement value.
Return
The previous value associated with the key, or null
Parameters
key
The metadata field name
value
The JsonElement value
Adds a custom metadata field with a String value.
Example: put("requestId", "req-456")
Adds a custom metadata field with a Number value.
Example: put("priority", 1)
Adds a custom metadata field with a Boolean value.
Example: put("urgent", true)
Adds a custom metadata field with a null value.
Example: put("optionalField", null)