Support for encoding metadata types