It's possible to register custom serializers for that. From the docs:
"It’s possible to support additional variable-types with a custom JSON representation (either simple value or complex/nested JSON object). By extending the initializeVariableConverters() method on org.activiti.rest.service.api.RestResponseFactory, you can add additional org.activiti.rest.service.api.engine.variable.RestVariableConverter classes to support converting your POJO’s to a format suitable for transferring through REST and converting the REST-value back to your POJO. The actual transformation to JSON is done by Jackson."