def json(self,): """creates json from data entry""" _json_data = [] for row in self.data: _json_data.append([sensor_tools.timestamp_to_timedelta(row[0]), row[1]]) return _json_data
def json(self, ): """creates json from data entry""" _json_data = [] for row in self.data: _json_data.append( [sensor_tools.timestamp_to_timedelta(row[0]), row[1]]) return _json_data
def json(self,): """return json of geospatial element""" return {'source':self.source, 'type':self.type, 'geom':self.geom, 'name':self.name, 'reading':self.reading, 'value':self.value, 'units':self.units, 'time':{ 'string':str(self.timestamp), 'json':sensor_tools.timestamp_to_timedelta(self.timestamp) } }
def json(self, ): """return json of geospatial element""" return { 'source': self.source, 'type': self.type, 'geom': self.geom, 'name': self.name, 'reading': self.reading, 'value': self.value, 'units': self.units, 'time': { 'string': str(self.timestamp), 'json': sensor_tools.timestamp_to_timedelta(self.timestamp) } }