stats_utils: formatting results as json