added support for serializing Map<DocumentId, ?>