added small toAA function

added small function to get an AA
(e.g. for serializeToJson)
does not handle extended fields though.