Hi @tpelzer,
try this statement:
ObjectValue typedCustomerValue = Variables.objectValue(customer).serializationDataFormat("application/json").create();
You can find more details here: https://docs.camunda.org/manual/7.10/user-guide/data-formats/json/
Hope this helps, Ingo