factor out parsing of the POST param-based api for customizing export to a more orderly JSON format