Better Json production using accumulated arrays for histograms.