replaced old function pm2json by new one