Add support for Key marshalling.