Skip to main content


Jackson is the default serialization format. No extra configuration is usually required for workflow/activity parameters to be serialized.
ZIO-Temporal goes with:

  • Jackson-Scala module
  • Java 8 data time module

(1) If custom serialization logic is required, refer to Jackson documentation.

(2) If providing a custom ObjectMapper is required (like this):

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.json.JsonMapper
// Scala module
import com.fasterxml.jackson.module.scala.DefaultScalaModule

val CustomMapper: ObjectMapper = JsonMapper
// Do whatever you need
// CustomMapper: ObjectMapper = com.fasterxml.jackson.databind.json.JsonMapper@70d7607c

Override the default ZWorkflowClientOptions by providing a new DataConverter:

import zio._
import zio.temporal.json._
import zio.temporal.workflow.ZWorkflowClientOptions
import io.temporal.common.converter.DataConverter

// Create a data converter
val dataConverter: DataConverter = JacksonDataConverter.make(CustomMapper)
// dataConverter: DataConverter = io.temporal.common.converter.DefaultDataConverter@94698cf

// Create a new ZWorkflowClientOptions
val optionsLayer =
ZWorkflowClientOptions.make @@
// override any configuration if needed
// optionsLayer: ZLayer[Any, Config.Error, ZWorkflowClientOptions] = Suspend(
// self = zio.ZLayer$$Lambda$8607/0x00007f228d9c46d0@61f2dd03
// )