Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.data/LenientConverters/BOOLEAN

BOOLEAN

val BOOLEAN: DataItemConverter<Boolean>

A lenient converter to Boolean values.

This converter attempts the following conversions in order:

  1. Direct extraction as Boolean

  2. Extraction as String and a case-insensitive parsing of common boolean representations:

    • "true", "yes", "1" ->true

    • "false", "no", "0" ->false

  3. Extraction as whole number where 0 is false and 1 is true

Returns null for other strings non-conforming to the rule above and any numbers other than 0 or 1

Generated by Dokka
(c) Tealium 2026