Support encoding for objects that provides mapping protocol