Depends on what you want to serialize? What kind of object? Is it needed to serialize it or is storing an identifier(and do a lookup) enough?
For the rest api, you can have custom serializers, see http://www.flowable.org/docs/userguide/index.html#_request_parameters :
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.flowable.rest.service.api.RestResponseFactory, you can add additional org.flowable.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.