if (!(point.getData() instanceof HistogramRollup)) {
throw new SerializationException("Unsupported type. HistogramRollup expected.");
}
HistogramRollup histogramRollup = (HistogramRollup) point.getData();
final JSONArray hist = new JSONArray();
for (Bin<SimpleTarget> bin : histogramRollup.getBins()) {
final JSONObject obj = new JSONObject();
obj.put("mean", bin.getMean());
obj.put("count", bin.getCount());
hist.add(obj);
}