yum2: added generalized JSON output function