def raw_json_encoder(o):
    if isinstance(o, TimingStat):
        return o.to_raw_dict(histogram=True)
    else:
        raise TypeError(repr(o) + " is not JSON serializable")
Use this encoder if you will be merging the data back in to another
dataset/ETHPy150Open wadey/python-ostrich/ostrich/stats.py/raw_json_encoder