adding support for contract-configured deserialising in Worker.