Added the ability to encode association lists as maps.

With this patch you can encode alists as maps.