New encode option

New ```encode``` option for fields.