Added support for Encoding objects