Send serialized object to DS server

I found a way of achieving it, i’m not sure if it’s compromising though.

On the client:

cally <- paste0("prepare_dataset_treeDS(", data, ", '", sf::rawToHex(serialize(questions, NULL)), "')")
DSI::datashield.assign.expr(datasources, "tree_data", as.symbol(cally))

On the server:

questions <- unserialize(wkb::hex2raw(questions))

This passes successfully a serialized object.