Added the ability to encode association lists as map.