Add support to encode record in a bert dict