smarter alist/plist encoding