the key associated with the value
a callback that performs the actual archiving of the value
int[string] arr = ["a"[] : 1, "b" : 2, "c" : 3]; auto archive = new XmlArchive!(); size_t i; foreach(k, v ; arr) { archive.archiveAssociativeArrayValue(to!(string)(i), { // archive the value }); i++; }
The foreach statement in the above example would most likely be executed in the callback passed to the archiveAssociativeArray method.
archiveAssociativeArray archiveAssociativeArrayKey
Archives an associative array value.
There are separate methods for archiving associative array keys and values because both the key and the value can be of arbitrary type and needs to be archived on its own.