Other Enumerations

The following enumerations are available globally.

  • A collection of lenient converters that can handle type mismatches in JSON data.

    These converters attempt multiple conversion strategies when the actual type in JSON differs from the expected type. They follow a fail-safe pattern: returning nil for invalid or non-representable values rather than crashing or producing corrupted data.

    Edge cases handled:

    • Integer overflow: NaN values return nil; values outside Int.min...Int.max (including infinities) are clamped to Int.min/Int.max
    • Special float values: Double.nan is treated as invalid; Double.infinity and -Double.infinity are clamped in integer conversions
    • String parsing: Invalid formats return nil rather than crashing
    • Type mismatches: Missing or incompatible types return nil

    Example usage:

    let payload: DataObject = ...
    let timeout = payload.getConvertible(key: "timeout", converter: LenientConverters.double)
    let retryCount = payload.getConvertible(key: "retryCount", converter: LenientConverters.int)
    let isEnabled = payload.getConvertible(key: "isEnabled", converter: LenientConverters.bool)
    
    See more

    Declaration

    Swift

    public enum LenientConverters

VALUES

  • Constants used throughout the Tealium SDK.

    See more

    Declaration

    Swift

    public enum TealiumConstants
  • Keys used for data in Tealium tracking events.

    See more

    Declaration

    Swift

    public enum TealiumDataKey
  • Units of time measurement.

    See more

    Declaration

    Swift

    public enum TimeUnit