There is a "private", undocumented function of the esri.tasks.PrintTask class called _getPrintDefinition which generates an object conforming to the
Export Web Map Specification. This is pretty useful and should be a supported, publicly available, documented namespace function. E.g., the function should be moved somewhere like esri.tasks.getPrintDefinition or esri.getPrintDefinition.