Pass the req object to the serialize/deserialize callbacks