def json(self):
        json_data = {}

        for item in self.iteritems():
            try:
                value = item.get_value(json_serializable=True)
            except TypeError:
                value = "NOT_SERIALIZABLE"
            item_data = {
                "tags": list(item.tags),
                "value": value,
            }
            if item.name in json_data:
                json_data[item.name].append(item_data)
            else:
                json_data[item.name] = [item_data]

        return json_data
Serializes data. Non-serializable outputs are replaced with
dataset/ETHPy150Open impactlab/eemeter/eemeter/meter/base.py/DataCollection.json