Fix json format for histograms and unroll buckets