Support encoding arbitrary objects for values